I’m using nagios to monitor multiple host connected to our server.
Nagios is working, I can see the status of the site and everything. However. When a host goes down, no e-mail are sent out.
here is the notification command
host-notify-by-email /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATES$\nAdress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n” | /bin/mail -s “Host $HOSTSTATE$ alert for $HOSTNAME$@SERVER.SITENAME!” $CONTACTEMAIL$
Now, I have checked all Contact Groups, Contacts and Time Periods and they are fine. Next, I verified that the “mail” cdm is working
printf “%b” “Test with printf” | mail -s “Superb Test with printf” firstname.lastname@example.org
I do receive the e-mail so the mail cmd is working.
Next step, check in nagios log.
It detects when the host goes down for Down, Unreachable, Recovery and an email has been sent to the right contacts with the command host-notify-by-email
Now for the funny part, that message is never to be received by me at the other end …
Any suggestion on what might be my the problem here ?
Running Red Hat 9 btw.