Search This Blog

Wednesday, May 16, 2012

Nagios unable to send email

Nagios unable to send email

ERROR MESSAGE

May 16 13:02:00 d4 nagios: Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: Uptime\nHost: xyz.com\nAddress: 50.116.53.49\nState: CRITICAL\n\nDate/Time: Wed May 16 13:02:00 IST 2012\n\nAdditional Info:\n\n(Return code of 127 is out of bounds - plugin may be missing)\n" | /bin/mail -s "** PROBLEM Service Alert: xyz.com/Uptime is CRITICAL **" support@xyz.com" resulted in a return code of 127.  Make sure the script or binary you are trying to execute actually exists...

SOLUTION
user@d4:user$ whereis mail
mail: /usr/bin/mail.mailutils /usr/bin/mail /usr/share/man/man1/mail.1.gz

user@d4:user$ sudo ln -s /usr/bin/mail /bin/mail

No comments:

Post a Comment