$SERVICEOUTPUT$ missing from emails.. Nagios 3.2.1
Giorgio Zarrelli
zarrelli at linux.it
Wed Apr 21 14:13:26 CEST 2010
Ok, found a workaround in this message:
http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg23566.html
Instead of
/usr/bin/printf "%b"
use
/bin/echo -e
so, notify-service-by-email becomes:
define command{
command_name notify-service-by-email
command_line /bin/echo -e "***** Nagios *****\n\nNotification
Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info
Aggiuntive:\n\n$SERVICEOUTPUT$ - $LONGSERVICEOUTPUT$" |
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert:
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
Cheers.
------------------------------------------------------------------------------
_______________________________________________
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