nagios monitoring - email alerts

Anthony Brock Anthony_Brock at ous.edu
Wed Oct 20 18:22:56 CEST 2004


Amy,

First, you need to confirm that you can send email independently of Nagios. For example, I can successfully send mail via:

nagios at test-nagios:~$ /usr/bin/mail -s "This is my subject" somebody at somewhere.com

Once this is confirmed (eliminating SSMPT as the source of your problem), you can then look at any remaining problems with Nagios. Should it still fail, you will need to visit your notification commands. For example, our version of Nagios is configured with:

# 'notify-by-email' command definition
define command{    
        command_name    notify-by-email 
        command_line    /usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nInfo:\n\n$OUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -r $CONTACTEMAIL$ $CONTACTEMAIL$
        }

In our situation, we use the '/usr/bin/mail' executable for submitting the emails to sendmail (which I can test manually). You may need to adjust this to the appropriate utility on your system. Also, don't forget to run your manual tests as the Nagios user (in case of permission problems).

Good luck,

Tony

>>> <amyreagan at comcast.net> 10/20/04 08:44AM >>>
Hi all -

I am running Nagios on a FreeBSD box that is NOT a mail server.  I am trying to configure SSMPT (which the freebsd documentation says is a simple client to allow outgoing mail only).  I can't get the notifications to send e-mails though.  I am either missing a simple configuration on freebsd, or there is something I need to change in one of the nagios config files.  Has anyone run into any problems like this before?  Will the alerting work if I am NOT using 'sendmail' on this box??  

Thanks,
Amy Reagan
amyreagan at comcast.net



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list