Format $OUTPUT$ in miscommands.cfg
Reutzel, Shane
Shane.Reutzel at MemberWorks.com
Wed Jul 28 22:02:26 CEST 2004
I am having a problem where any notification that is sent to the
miscommands.cfg for the "notify-by-email" definition gets truncated when it
encounters a "\" in the $OUTPUT$ macro.
Example:
"Landesk Login Alert: Remote control session started with machineA from
DOMAINNAME\username using Windows NT security" is the output of the command,
which shows up correctly in the web interface. But when an email is sent
using this entry in the miscommands.cfg:
command{
command_name notify-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: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$ |
/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
$SERVICESTATE$ **" $CONTACTEMAIL$
}
All I get is this:
"Landesk Login Alert: Remote control session started with HTNWLOGGER from
DOMAINNAME" and it seems to be cutting off at the "\" in the output. Is
there anyway to format this so that it changes the "\" to something else or
anything so I can get the entire output without the truncation?
Any help would be appreciated.
Thanks,
Shane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040728/87fa459f/attachment.html>
More information about the Users
mailing list