<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C3A889.4C574700">
<title>Re: [Nagios-users] a "$" in checkcommands definition</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none;
text-underline:none;
text-decoration:none;
text-line-through:none;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><!-- Converted from text/plain format -->Shoot, I thought I
have fixed that. Okay that explains the 127 error.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Now I’m getting an UNKNOWN state (</span></font><st1:City><st1:place><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Orange</span></font></st1:place></st1:City><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>) with
status information: <span class=SpellE>check_nt</span>: Unknown argument
(null).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Marc Powell
[mailto:mpowell@ena.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, November 11, 2003
6:52 PM<br>
<b><span style='font-weight:bold'>To:</span></b> scottb@ssbweb.com;
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Nagios-users] a
"$" in checkcommands definition</span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p style='margin-bottom:12.0pt'><font size=2 face="Times New Roman"><span
style='font-size:10.0pt'>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</span></font><o:p></o:p></p>
</div>
</div>
</body>
</html>