correct notify definition to allow for check_nt_disk output to not be blanked.

Rodney Caston rodney.caston at match.com
Thu Aug 4 15:45:01 CEST 2005


I have the following issue with check_nt_disk, it outputs to nagios the
following status information:

C:\ - total: 203.50 Gb - used: 87.55 Gb (43%) - free 115.95 Gb (57%)

However, when we receive notifications for this alert, our
$SERVICEOUTPUT$ only gives us the following information on this alert. 
...

Service:	DISK
Host:	 hostname
Address: 10.0.2.1
State: WARNING
Info: C:

...

Everything after the ":" for "C:\" is being truncated, I'm sure this is
due to the "\" being seen as an escape character somehow.  

In misccommands.cfg our pager definition for these alerts is defined as
followed.
...
# 'notify-by-epagerusingmutt' command definition (short form)
define command{
command_name    notify-by-muttpager-short
command_line    /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost:
$HOSTNAME$\n$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\nInfo: $SERVICEOUTPUT$\nDate:
$LONGDATETIME$\n\n\nUser:$CONTACTNAME$" | /usr/bin/mutt -F
/etc/nagios/muttrc.cfg -e 'set realname=""' -s "`echo $NOTIFICATIONTYPE$
| /usr/bin/cut -c '1-3'`: $HOSTNAME$/$SERVICEDESC$ $SERVICESTATE$"
$CONTACTPAGER$ 2>&1 | logger -p mail.info
}
...


Should we be putting $SERVICEOUPUT$ in some escaped form or inside
quotes to prevent this problem?


Rodney Caston
Match.com




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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