Problem backslash

Bishop, Dean dean.bishop at tcdsb.org
Thu Oct 10 13:57:17 CEST 2002


try this instead:


# 'notify-by-email' command definition
define command{
        command_name notify-by-email
        command_line /bin/echo -e 'Nagios dice:\n\n\nServicio:
$SERVICEDESC$\nHost: $HOSTALIAS$\nDireccion: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nFecha/Hora: $DATETIME$\n\nInfo Adicional:\n$OUTPUT$' |
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ - $HOSTALIAS$ - $SERVICEDESC$ es
$SERVICESTATE$ **" $CONTACTEMAIL$
}

note that you will need to insert your path to echo.  also note that the
double-quotes were replaced with single quotes.


dean

dream outloud

-----Original Message-----
From: Cristian Trujillo G. [mailto:cristian at alestraidc.net.mx]
Sent: Wednesday, October 09, 2002 7:10 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Problem backslash




Hi,
when recive notification via mail, all lines are ok, only one are bad..
on $OUTPUT$, when the value is c:\ or other drive only print

Aditional Info:

C:

no, backslash and no more info... this is me miscomands.cfg


# 'notify-by-email' command definition
define command{
        command_name notify-by-email
        command_line /usr/local/bin/gprintf "Nagios dice:\n\n\nServicio:
$SERVICEDESC$\nHost: $HOSTALIAS$\nDireccion: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nFecha/Hora: $DATETIME$\n\nInfo Adicional:\n$OUTPUT$" |
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ - $HOSTALIAS$ - $SERVICEDESC$ es
$SERVICESTATE$ **" $CONTACTEMAIL$
}


Note 1.-
gprintf is sh-utils part.
OS FreeBSD

Thanks



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list