Hi everyone,
i’m configuring Nagios 3.0.6 to send notifications via email. I’ve configured the commands.cfg, contacts.cfg, nagios.cfg, etc.
This is what the nagios.log file saves:
[1230743045] SERVICE NOTIFICATION: ops;AG010-US;Proxy 8008;OK;notify-service-by-email;HTTP OK HTTP/1.1 200 OK - 320 bytes in 0.045 seconds
[1230743076] Warning: Contact 'ops' service notification command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: RECOVERY\n\nService: Proxy 8008\nHost: AG010-US\nAddress: 72.11.128.231\nState: OK\n\nDate/Time: Wed Dec 31 09:04:05 PST 2008\n\nAdditional Info:\n\nHTTP OK HTTP/1.1 200 OK - 320 bytes in 0.045 seconds" | /bin/mail -s "** RECOVERY Service Alert: AG010-US/Proxy 8008 is OK **" [email protected]' timed out after 30 seconds
The /var/log/maillog says that the petition never arrives to sendmail, because i used grep over the maillog file to search for the email address ( [email protected] ) and nothing was found.
I have a nagiosadmin contact which mail is nagios@localhost. This mail is the only one that gets delivered.
If i ran the command myself, as user nagios or any other, it works fine and the mail arrives. The command i ran was:
/usr/bin/printf “%b” “***** Nagios ***\n\nNotification Type: RECOVERY\n\nService: Proxy 8008\nHost: AG010-US\nAddress: 72.11.128.231\nState: OK\n\nDate/Time: Wed Dec 31 09:04:05 PST 2008\n\nAdditional Info:\n\nHTTP OK HTTP/1.1 200 OK - 320 bytes in 0.045 seconds" | /bin/mail -s " RECOVERY Service Alert: AG010-US/Proxy 8008 is OK **” [email protected]
Please help, i can’t even tell if this a Nagios problem or a sendmail one…
Thanks