Code: Select all
[root@### ~]# su nagios -c '/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n"'
***** Nagios Monitor XI Alert *****
You have new mail in /var/spool/mail/root
###### WARNING ######
Errors reported during AutoMySQLBackup execution.. Backup failed
Error log below..
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
From root@###.###.com Mon Feb 20 08:00:03 2012
Return-Path: <root@###.###.com>
X-Original-To: root
Delivered-To: root@###.###.com
Received: by root@###.###.com (Postfix, from userid 0)
id 5FE4F2213C; Mon, 20 Feb 2012 08:00:03 -0800 (PST)
From: root@###.###.com (Cron Daemon)
To: root@###.###.com
Subject: Cron <root@###> /root/scripts/autopostgresqlbackup
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20120220160003.5FE4F2213C@###.###.com>
Date: Mon, 20 Feb 2012 08:00:03 -0800 (PST)
/root/scripts/autopostgresqlbackup: line 491: mail: command not found