<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Re: [Nagios-users] a "$" in checkcommands definition</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>You're using $USER$ instead of $USER1$ in the command path.<BR>
<BR>
<BR>
--<BR>
Marc<BR>
<BR>
-----Original Message-----<BR>
From: Scott Barnhill <scottb@ssbweb.com><BR>
To: nagios-users@lists.sourceforge.net <nagios-users@lists.sourceforge.net><BR>
Sent: Tue Nov 11 18:53:37 2003<BR>
Subject: [Nagios-users] a "$" in checkcommands definition<BR>
<BR>
<BR>
All,<BR>
<BR>
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…)<BR>
<BR>
The nagios configs are as follows:<BR>
<BR>
define command{<BR>
        host_name                       wf1<BR>
        service_description             AUDIT Q MSG<BR>
        is_volatile                     0<BR>
        check_period                    24x7<BR>
        max_check_attempts              3<BR>
        normal_check_interval           3<BR>
        retry_check_interval            1<BR>
        contact_groups                  techops<BR>
        notification_interval           120<BR>
        notification_period             24x7<BR>
        notification_options            u<BR>
        check_command                   audit_queue!5!10<BR>
        }<BR>
<BR>
and:<BR>
<BR>
# Check the number of items in the MSMQ Audit Queue<BR>
define command{<BR>
        command_name    audit_queue<BR>
        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$<BR>
}<BR>
<BR>
<BR>
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?<BR>
<BR>
Thanks!<BR>
-scott<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>