nagios not notifying by email

Bill Jacqmein wrjacqmein at gmail.com
Mon Feb 20 22:36:53 CET 2006


My notify-by-email
=========snip==========
define command {
command_name                   notify-by-email
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$
}
=========snip==========

Does /bin/mail exist on your system?
Is /bin/mail accessible by the nagios user?

What I can think of off the top of my head.

Bill

On 2/20/06, Dave Stern <dave at umiacs.umd.edu> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060220/54abb0e2/attachment.html>


More information about the Users mailing list