Notify by service email

Bilder, Jeff jbilder at csstars.com
Wed Jul 9 19:23:19 CEST 2008


I am having an issue where nagios is not sending the $SERVICENOTES$
variable in emails when a service goes down.  Please see the following
test example:

 

define serviceextinfo{

        host_name               Router

        service_description     Check_eth1/2

        notes                   "this is the Ethernet interface"

        }

 

# 'notify-service-by-email' command definition

define command{

        command_name    notify-service-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: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$\n\nService Notes:\n\n$SERVICENOTES$" |
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert:
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$

        }

 

Email:

 

***** Nagios *****

 

Notification Type: RECOVERY

 

Service: Check_eth1/2

Host: Router

Address: <hidden>

State: OK

 

Date/Time: Wed Jul 9 12:32:55 CDT 2008

 

Additional Info:

 

Ethernet1/2:UP:1 UP: OK

 

Service Notes:

 

Any help is much appreciated.

 

Thanks!

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080709/2163c93e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
-------------- next part --------------
_______________________________________________
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