No email notification
Posted: Wed Aug 08, 2012 11:13 am
Hi,
I have just installed and configured Nagios on a CentOS6 machine. It is nicely monitoring my other two CentOs servers through NRPE. But I could not get the alert emails sent.
I have enabled debug and I could see the actual email command in the /var/log/nagios/nagios.debug. If I copy that whole command, and execute it from the command line, it sends the email without any problem
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: CUSTOM\n\nService: CPU\nHost: myhostname\nAddress: myhost.mydomain\nState: CRITICAL\n\nDate/Time: Wed Aug 8 16:45:45 BST 2012\n\nAdditional Info:\n\nConnection refused by host\n" | /usr/bin/nail -r "from@mydomain (Nagios)" -s "** CUSTOM Service Alert: myhost/CPU is CRITICAL **" -S "smtp=mysmtp" -S "smtp-auth=login" -S "smtp-auth-user=from@mydomain" nagiosadmin@mydomain
Can anybody throw some light on this?
Thanks
I have just installed and configured Nagios on a CentOS6 machine. It is nicely monitoring my other two CentOs servers through NRPE. But I could not get the alert emails sent.
I have enabled debug and I could see the actual email command in the /var/log/nagios/nagios.debug. If I copy that whole command, and execute it from the command line, it sends the email without any problem
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: CUSTOM\n\nService: CPU\nHost: myhostname\nAddress: myhost.mydomain\nState: CRITICAL\n\nDate/Time: Wed Aug 8 16:45:45 BST 2012\n\nAdditional Info:\n\nConnection refused by host\n" | /usr/bin/nail -r "from@mydomain (Nagios)" -s "** CUSTOM Service Alert: myhost/CPU is CRITICAL **" -S "smtp=mysmtp" -S "smtp-auth=login" -S "smtp-auth-user=from@mydomain" nagiosadmin@mydomain
Can anybody throw some light on this?
Thanks