a "$" in checkcommands definition
Scott Barnhill
scottb at ssbweb.com
Wed Nov 12 03:23:34 CET 2003
Shoot, I thought I have fixed that. Okay that explains the 127 error.
Now I'm getting an UNKNOWN state (Orange) with status information:
check_nt: Unknown argument (null).
-----Original Message-----
From: Marc Powell [mailto:mpowell at ena.com]
Sent: Tuesday, November 11, 2003 6:52 PM
To: scottb at ssbweb.com; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] a "$" in checkcommands definition
You're using $USER$ instead of $USER1$ in the command path.
--
Marc
-----Original Message-----
From: Scott Barnhill <scottb at ssbweb.com>
To: nagios-users at lists.sourceforge.net
<nagios-users at lists.sourceforge.net>
Sent: Tue Nov 11 18:53:37 2003
Subject: [Nagios-users] a "$" in checkcommands definition
All,
I'm trying to set up a check to check the number of items in an MSMQ
Queue on a windows server. I'm using NSClient to get to a Counter that
provides the number of items in the queue. From the command line the
check_nt command executes as expected. However when executed from within
Nagios it returns: Return code of 127 is out of bounds.)
The nagios configs are as follows:
define command{
host_name wf1
service_description AUDIT Q MSG
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups techops
notification_interval 120
notification_period 24x7
notification_options u
check_command audit_queue!5!10
}
and:
# Check the number of items in the MSMQ Audit Queue
define command{
command_name audit_queue
command_line $USER$/check_nt -H $HOSTADDRESS$ -p 1248 -v
COUNTER -l '\\MSMQ Queue(wf1\private$\ppmd audit)\\Messages in
Queue','Items in MSMQ Audit Queue: %.f' -w $ARG1$ -c $ARG2$
}
I'm pretty sure that it's the fact that the MSMQ queue name in the -l
portion of the command has a "$" contained in it. Is there any way to
escape out the "$" ? I've tried single, double quotes, and "\" before
it. I've also tried putting the "private$" portion into $ARG1$. All with
no success. Does anybody have any additional ideas?
Thanks!
-scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031111/e306c113/attachment.html>
More information about the Users
mailing list