check_nt and output
Casey Stamper
CStamper at pivot.com
Wed Aug 21 19:10:46 CEST 2002
When I use the following command in services.cfg:
# Service definition
define service{
use generic-service ; Name of service template to use
host_name ohpiv1tigq04
service_description ntdiskc
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 5
retry_check_interval 1
contact_groups nt-admins
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_nt_disk!c!80!90
}
taken from the commands.cfg line:
command[check_nt_disk]=$USER1$/check_nt -H $HOSTADDRESS$ -p 1248 -v
USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
I get the following output in the web interface and at the command line:
c:\ - total: 3.96 Gb - used: 3.19 Gb (81%) - free 0.77 Gb (19%)
but when using this command in miscommands.cfg:
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /usr/bin/printf "%b"
"$NOTIFICATIONTYPE$\n$SERVICEDESC$\n$HOSTALIAS$\n$SERVICESTATE$\n$SHORTDATET
IME$\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$-
$HOSTALIAS$/$SERVICEDESC$ $SERVICESTATE$ **" $CONTACTEMAIL$
}
my notification email looks like this:
PROBLEM
ntdiskc
ohpiv1tigaq04
WARNING
08-21-2002 09:52:23
c:
As you can see, all test after the "\" character is cut off. I know that's
because the "\" character needs a delimiter but I've tried putting the
delimiter in the notify-by-email command definition in several different
places but it didn't work. Anybody?
Casey Stamper
A+, MCP+I, MCSE
Senior Network Engineer
Pivot/Info-One
400 Lazelle Rd, Suite 16
Columbus, OH 43240
614.825.5831
614.825.5844 Fax
Note: This transmission may not be protected by encryption software, though
the information contained herein may be privileged and confidential and
protected from disclosure. If the reader of this message is not the intended
recipient, or an employee or agent responsible for delivering this message
to the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
are receiving this communication in error, please notify us immediately by
replying to the message and deleting it from your computer. Thank you for
your cooperation.
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
More information about the Users
mailing list