Nagios does not send email notifications

ReynierPM rperezm at uci.cu
Tue Dec 8 20:41:58 CET 2009


Hi every:
I have problems now with email notification unless I didn't receive one. 
   I check Nagios Event Logs and see this:

[12-08-2009 14:53:28] Warning: Attempting to execute the command 
"/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: 
PROBLEM\n\nService: Bacula Dir Daemon\nHost: bacula\nAddress: 
10.128.50.11\nState: UNKNOWN\n\nDate/Time: Tue Dec 8 14:53:28 CST 
2009\n\nAdditional Info:\n\nRemote command execution failed: Permission 
denied, please try again." | /bin/mail -s "** PROBLEM Service Alert: 
bacula/Bacula Dir Daemon is UNKNOWN **" rperezm at uci.cu" resulted in a 
return code of 127. Make sure the script or binary you are trying to 
execute actually exists...

But the mail never arrive to my Inbox. Why? My config is as follow:

define command{
	command_name	notify-host-by-email
	command_line	/usr/bin/printf "%b" "***** Nagios *****\n\nNotification 
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: 
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | 
/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is 
$HOSTSTATE$ **" $CONTACTEMAIL$
}

# 'notify-service-by-email' command definition
define command{
	command_name	notify-service-by-email
	command_line	/usr/bin/printf "%b" "***** Nagios *****\n\nNotification 
Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: 
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: 
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s 
"** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is 
$SERVICESTATE$ **" $CONTACTEMAIL$
}

Cheers and thanks in advance
-- 
ReynierPM

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list