Service Notifications not sending email

Rob Groome groome at ict.usc.edu
Thu Jun 28 05:35:36 CEST 2007


>
> When set to the above I get the following in /var/log/messages:
> Jun 27 10:44:46 alpha nagios: SERVICE NOTIFICATION: it;system1;Disk -
> D:;CRITICAL;notify-by-email;d:\ - total: 213.20 Gb - used: 12.10 Gb
> (6%) - free 201.11 Gb (94%)
>
> notify-by-email command definition:
> # '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: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n
> \nDate/Time: $DATE$ $TIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n
> $SERVICEPERFDATA$\n$SERVICEACKCOMMENT\n" | /bin/mail -s "**
> $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE
> $ **" $CONTACTEMAIL$
>          }
>

This is fixed now thanks to help from Marc Powell who led me in the  
right direction.

If you look at the command_line for the above notification command  
you will notice that the $SERVICEACKCOMMENT does not have the  
trailing $ for the variable.  Because of this - the email for the  
service notifications are not sent out - and there is also no error  
associated with that problem.   I added in the $ at the end of the  
variable and now the service notifications are working again.

Crazy easy, but so simple to miss.  Thanks again Marc!

Rob


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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