<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I’m testing a script where I pass an IP address to a
Windows command/batch file.  The IP is separated by the ! as shown
below.  In the definition of the command, I define –p $ARG1$. 
And finally on the host I’m trying to catch the argument.  Either
the command definition or the actual argument in Windows is not right. 
Any comments?<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'>From the definition file:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>define service{<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 style='text-indent:.5in'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>check_command           check_nrpe_nt_remote_arg!192.168.4.8<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'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>From the checkcommands.cfg:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>define command{<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>            command_name            check_nrpe_nt_remote_arg<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>            command_line               /usr/local/nagios/libexec/check_nrpe
–H $HOSTADDRESS$ -c nrpe_nt_check_remote_arg –p $ARG1$<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'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>From the host’s NRPE.cfg file:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>command[nrpe_nt_check_remote_arg]=c:\nrpe_nt\ping_remote.cmd
$arg1$<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'>Regards,<br>
bjd<br>
 <br>
~Brian J. Dent<br>
CompuDent Systems<br>
</span></font><br>
<font size=1 color=black face=Arial><span style='font-size:7.5pt;font-family:
Arial;color:black'>v (831) 649-2575, c (831) 224-2875, f (831) 649-0948<br>
</span></font><a href="mailto:bjd@compudentsystems.com"
title="mailto:bjd@compudentsystems.com"><font size=1 face=Arial
title="mailto:bjd@compudentsystems.com"><span
title="mailto:bjd@compudentsystems.com"><span style='font-size:7.5pt;
font-family:Arial'>bjd@compudentsystems.com</span></span></font></a><br>
<a href="http://www.compudentsystems.com"
title="http://www.compudentsystems.com"><font size=1 face=Arial
title="http://www.compudentsystems.com"><span
title="http://www.compudentsystems.com"><span style='font-size:7.5pt;
font-family:Arial'>http://www.compudentsystems.com</span></span></font></a> <br>
<br>
<font size=1 face=Arial><span style='font-size:7.5pt;font-family:Arial'>NOTE: 
This e-mail is confidential and is intended only for the recipient(s)
listed.  Unauthorized use or disclosure of this e-mail or any of the
information in it is strictly prohibited.  If you are not a listed
recipient or someone authorized to receive e-mail on behalf of a listed
recipient, please reply to the sender that the e-mail was misdirected and
delete the e-mail.  Thank you.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>