Fwd: $SERVICEOUTPUT$ empty in e-mail notifications

m s pzn111 at gmail.com
Mon Jan 19 08:40:24 CET 2009


Hello

Same problem here.
Nagios 3.0.3, Debian Etch 2.6.18-6-686

A part of nagios.debug. It includes command definition by itself, so I
don't post it.

[1232341045.014023] [2048.1] [pid=31719] **** BEGIN MACRO PROCESSING ***********
[1232341045.014028] [2048.1] [pid=31719] Processing: '/usr/bin/printf
"%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTNAME$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$
Service Alert: $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$'
[1232341045.014099] [2048.1] [pid=31719]   Done.  Final output:
'/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
PROBLEM\n\nService: Disk G: Free Space\nHost: serv\nAddress:
192.168.19.99\nState: WARNING\n\nDate/Time: Mon Jan 19 09:57:25 YEKT
2009\n\nAdditional Info:\n\ng:\ - total: 136,73 Gb - used: 125,08 Gb
(91%) - free 11,65 Gb (9%)" | /usr/bin/mail -s "** PROBLEM Service
Alert: serv/Disk G: Free Space is WARNING **" admin at some.domain'
[1232341045.014107] [2048.1] [pid=31719] **** END MACRO PROCESSING *************

Executing the "/usr/bin/printf" part in the console gives the same
output as in e-mail notofications.
While writing this message I figured out that adding \n to the end of
the string passed to printf resolves the problem. I guess it's not a
nagios bug.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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