Escaping $OUTPUT$
Rabie van der Merwe
Rvdmerwe at mhg.co.za
Thu Jun 19 10:19:55 CEST 2003
Hi,
I need to escape the "$OUTPUT$" as one of my checks returns a "\" ( c:\ -
total: 2.00 Gb - used: 2.00 Gb (100%) - free 0.00 Gb (0%) )
and this causes printf to print up to the "\" and then stop.
Anyone know how I can escape the output of the variable?
Regards
Rabie
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b" " ***** Nagios
*****\n\nDate/Time: $DATETIME$\n\nNotification Type:
$NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\nAdditional Info:\n\n$OUTPUT$" |
/bin/mail -s "*$NOTIFICATIONTYPE$ alert* - $HOSTNAME$/$SERVICEDESC$ is
$SERVICESTATE$" $CONTACTEMAIL$
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030619/bb5bad7c/attachment.html>
More information about the Users
mailing list