Nagios Email Notification Problem


#1

All,

I am very new to both Linux and Nagios. I was able to get nagios installed and running without issue. I have installed Postfix set up to relay to Gmail after following the following walkthrough, http://www.felipe-alfaro.org/blog/2009/05/10/have-postfix-relay-e-mail-to-gmail/ I am able to send out to my gmail account with the following command: mail email@gmail.com and am able to watch the message go through my mail.log in /var/log directory. However, when I intentionally down a test PC that I am monitoring via Nagios I see the notification go out via nagios.log but my mail.log does not move at all…any help would be greatly appreciated. This is running on Ubuntu 9.10. Version of Nagios is 3.2.0 with the 3.4.14 plugins. The post in nagios.log is as follows:

HOST NOTIFICATION: rvie;test-pc;DOWN;host-notify-by-email;CRITICAL - Host Unreachable (IP Address)


#2

Interesting, does it work when port 25 is blocked? looks like it use port 587.

Anyway, have you changed the mail commands? I am also using ubuntu 9.10 and I had to change ‘/bin/mail’ to ‘/usr/bin/mail’.
instead of mail email@gmail.com try the full command line use in the nagios command file.


#3

Yup that worked changing it from bin/mail to usr/bin/mail…I thought that I had tried that before, but obviously I had not. My notifications are working PERFECTLY now. Thank you for your help, I REALLY appreciate it.