My notify-by-email<br>=========snip==========<span class="q"><br>define command {<br>command_name                   notify-by-email<br></span>command_line                  
/usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional
Info:\n\n$OUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
<br>}<br>=========snip==========<br><br>Does /bin/mail exist on your system? <br>Is /bin/mail accessible by the nagios user?<br><br>What I can think of off the top of my head. <br><br>Bill<br><br><div><span class="gmail_quote">
On 2/20/06, <b class="gmail_sendername">Dave Stern</b> <<a href="mailto:dave@umiacs.umd.edu">dave@umiacs.umd.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We have two iterations at our site, one running the old netsaint (which<br>works flawlessly) and one running nagios 1.2 on RHEL E3-AS. The latter<br>rebuilds its config files each night based on various site-specific<br>files detailing what hosts we have, what to monitor on them etc.
<br><br>The Linux version is not notifying when hosts/services go down. I suspect<br>this is nothing more than the notify-by-email command.<br><br>On netsaint, it's<br><br>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$<br>
<br>and on linux its<br><br># 'notify-by-email' command definition<br>define command{<br>         command_name    notify-by-email<br>         command_line    /usr/bin/printf "%b" "***** Nagios  *****\n\nNotificati
<br>on Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddre<br>ss: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional<br>  Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$
<br>SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$<br>         }<br><br>Does anyone know what the command should look like and how to test the above?<br>Thanks<br><br><br><br>  =-=-=-=-=-=-=-=-=-=-  generated by /dev/dave -=-=-=-=-=-=-=-=-=-=-=-=
<br>  David Stern                                    University of Maryland<br>            Institute for Advanced Computer Studies<br><br><br>-------------------------------------------------------<br>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
<br>for problems?  Stop!  Download the new AJAX search engine that makes<br>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!<br><a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642">
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
<br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>