<html xmlns:v="urn:schemas-microsoft-com:vml" 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=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Running Windows batch files through NRPE</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Franklin Gothic Medium";
        panose-1:2 11 6 3 2 1 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:331765264;
        mso-list-template-ids:-102863624;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
@list l1
        {mso-list-id:1026323631;
        mso-list-template-ids:1747232978;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        mso-ansi-font-size:10.0pt;
        font-family:"Courier New";
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>

</head>

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

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I don’t think that Nagios/nscp is
geared to what you want it to do.  Instead, I would suggest that a Scheduled
Task might be more appropriate (or use something like SMS to push out an update
on demand/on a schedule, if you have it in place).<o:p></o:p></span></font></p>

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

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

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

<div>

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

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Steve Onotsky</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Server Support Technologist</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Broadridge<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Investor Communication Solutions, <st1:country-region
w:st="on"><st1:place w:st="on">Canada</st1:place></st1:country-region><o:p></o:p></span></font></p>

<p class=MsoNormal><st1:Street w:st="on"><st1:address w:st="on"><font size=1
  color=navy face=Arial><span style='font-size:7.5pt;font-family:Arial;
  color:navy'>5970 Chedworth Way</span></font></st1:address></st1:Street><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><font size=1
  color=navy face=Arial><span style='font-size:7.5pt;font-family:Arial;
  color:navy'>Mississauga</span></font></st1:City><font size=1 color=navy
 face=Arial><span style='font-size:7.5pt;font-family:Arial;color:navy'>  <st1:State
 w:st="on">ON</st1:State>  <st1:PostalCode w:st="on">L5R 4G5</st1:PostalCode></span></font></st1:place><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Tel: (905) 507-5328</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Fax: (905) 507-5312</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face=Arial><span style='font-size:
7.5pt;font-family:Arial;color:navy'>Inet: </span></font><font color=navy><span
style='color:navy'><a href="mailto:steve.onotsky@broadridge.com"><font size=1
face=Arial><span style='font-size:7.5pt;font-family:Arial'>steve.onotsky@broadridge.com</span></font></a><o:p></o:p></span></font></p>

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

<p class=MsoNormal><em><i><font size=1 color=navy face="Times New Roman"><span
style='font-size:7.5pt;color:navy'>Quis custodiet ipsos custodes?</span></font></i></em><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Times New Roman"><span
style='font-size:7.5pt;color:navy'>- Juvenal, <em><i><font
face="Times New Roman">Satires</font></i></em>, VI, 347</span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>

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

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Leleux, Jeremy J [mailto:jjleleux@sunlandconstruction.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> May 19, 2009 10:15<br>
<b><span style='font-weight:bold'>To:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Nagios-users] Running
Windows batch files through NRPE</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

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

<p><font size=3 face=Calibri><span lang=EN-US style='font-size:12.0pt;
font-family:Calibri'>Hi All,</span></font><o:p></o:p></p>

<p><font size=3 face=Calibri><span lang=EN-US style='font-size:12.0pt;
font-family:Calibri'>I’m running Nagios 3.0.6/CentOS 5.2 for my Nagios
server.  Its monitoring my Windows Servers, all 2003, I have</span></font><span
lang=EN-US> </span><font face=Calibri><span lang=EN-US style='font-family:Calibri'>NSClient++
on those servers and its working fine.  My problem is that I’m
trying to centralize the configs on the NSClient++’s w/ the help of batch
files.  I have</span></font><span lang=EN-US> </span><font face=Calibri><span
lang=EN-US style='font-family:Calibri'>setup commands to allow me run the
scripts w/ the help of check_nrpe, but they will not run.</span></font><o:p></o:p></p>

<p><font size=3 face=Calibri><span lang=EN-US style='font-size:12.0pt;
font-family:Calibri'>Here is the contents of one of my</span></font><span
lang=EN-US> </span><font face=Calibri><span lang=EN-US style='font-family:Calibri'>batch
files, nscpp_config.bat, to update the NSClient++ config:</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=3 face=Calibri><span lang=EN-US
style='font-size:12.0pt;font-family:Calibri'>@echo off</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=3 face=Calibri><span lang=EN-US
style='font-size:12.0pt;font-family:Calibri'>xcopy
\\10.10.0.50\public\Departments\Infor~1\Scripts\nscpp_copy.bat
C:\Progra~1\NSClient++ /Y</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=3 face=Calibri><span lang=EN-US
style='font-size:12.0pt;font-family:Calibri'>exit</span></font><o:p></o:p></p>

<p><font size=3 face=Calibri><span lang=EN-US style='font-size:12.0pt;
font-family:Calibri'>When I try to run this command from my Nagios Server, I
get an</span></font><span lang=EN-US> </span><font face=Calibri><span
lang=EN-US style='font-family:Calibri'>“Invalid Drive Specification
Error”.  And here is my config line to allow the command in
NSClient++:</span></font><o:p></o:p></p>

<p style='margin-left:72.0pt'><font size=3 face=Calibri><span lang=EN-US
style='font-size:12.0pt;font-family:Calibri'>cp_script=nscpp_config.bat</span></font><o:p></o:p></p>

<p><font size=3 face=Calibri><span lang=EN-US style='font-size:12.0pt;
font-family:Calibri'>If someone else has done this in past, please let me know
how you have done this.</span></font><o:p></o:p></p>

<p><font size=2 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:10.0pt;font-family:"Franklin Gothic Medium"'>Respectfully,</span></font><o:p></o:p></p>

<p><font size=3 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:12.0pt;font-family:"Franklin Gothic Medium"'>Jeremy</span></font><span
lang=EN-US> </span><font face="Franklin Gothic Medium"><span lang=EN-US
style='font-family:"Franklin Gothic Medium"'>Leleux</span></font><o:p></o:p></p>

<p><font size=3 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:12.0pt;font-family:"Franklin Gothic Medium"'>IT Administrator</span></font><o:p></o:p></p>

<p><font size=3 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:12.0pt;font-family:"Franklin Gothic Medium"'>Sunland
Construction, Inc.</span></font><o:p></o:p></p>

<p><font size=3 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:12.0pt;font-family:"Franklin Gothic Medium"'>Corporate
Division</span></font><o:p></o:p></p>

<p><font size=2 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:10.0pt;font-family:"Franklin Gothic Medium"'>Office:
337.550.2142</span></font><o:p></o:p></p>

<p><font size=2 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:10.0pt;font-family:"Franklin Gothic Medium"'>Fax: 337.546.0245</span></font><o:p></o:p></p>

<p><st1:City w:st="on"><st1:place w:st="on"><font size=2
  face="Franklin Gothic Medium"><span lang=EN-US style='font-size:10.0pt;
  font-family:"Franklin Gothic Medium"'>Mobile</span></font></st1:place></st1:City><font
size=2 face="Franklin Gothic Medium"><span lang=EN-US style='font-size:10.0pt;
font-family:"Franklin Gothic Medium"'>: 337.580.6062</span></font><o:p></o:p></p>

<p><font size=2 face="Franklin Gothic Medium"><span lang=EN-US
style='font-size:10.0pt;font-family:"Franklin Gothic Medium"'>Email:
jjleleux@sunlandconstruction.com</span></font><o:p></o:p></p>

</div>

</body>

</html>

<pre>This message and any attachments are intended only for the use of the addressee and
may contain information that is privileged and confidential. If the reader of the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.