nagios not notifying by email

Dave Stern dave at umiacs.umd.edu
Mon Feb 20 22:02:48 CET 2006


We have two iterations at our site, one running the old netsaint (which
works flawlessly) and one running nagios 1.2 on RHEL E3-AS. The latter
rebuilds its config files each night based on various site-specific
files detailing what hosts we have, what to monitor on them etc.

The Linux version is not notifying when hosts/services go down. I suspect 
this is nothing more than the notify-by-email command.

On netsaint, it's

command[notify-by-email]=/usr/bin/printf '%s\n%s\n%s\n%s' '***** NetSaint 0.0.7 ***** $SERVICESTATE$ alert/notification'  'Host: $HOSTNAME$ Address: $HOSTADDRESS$', 'Additional Info: $OUTPUT$' | /usr/bin/mailx -s 'Service alert: $HOSTNAME$ is $SERVICESTATE$ **, $SERVICEDESC$' $CONTACTEMAIL$

and on linux its

# 'notify-by-email' command definition
define command{
         command_name    notify-by-email
         command_line    /usr/bin/printf "%b" "***** Nagios  *****\n\nNotificati
on Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddre
ss: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional
  Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$
SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
         }

Does anyone know what the command should look like and how to test the above?
Thanks



  =-=-=-=-=-=-=-=-=-=-  generated by /dev/dave -=-=-=-=-=-=-=-=-=-=-=-=
  David Stern                                    University of Maryland
            Institute for Advanced Computer Studies


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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