<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Running Windows batch files through NRPE</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Hi All,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">I</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">’</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">m running Nagios 3.0.6</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">/CentOS 5.2 for my Nagios server. Its monitoring my Windows Servers, all 2003, I have</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">NSClient++ on those servers and its working fine. My problem is that I</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">’</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">m trying to centralize the configs on the NSClient</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">++</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">’</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">s w/ the help of batch files. I have</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">setup commands to allow me run the scripts w/ the help of check_nrpe, but they will n</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">ot run.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">Here is the contents of one of my</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">batch files</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">, nscpp_config.bat,</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri"> to update the NSClient++ config:</FONT></SPAN></P>
<UL DIR=LTR><UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">@echo off</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">xcopy \\10.10.0.50\public\Departments\Infor~1\Scripts\nscpp_copy.bat C:\Progra~1\NSClient++ /Y</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">exit</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
</UL></UL>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">When I try to run this command from my Nagios Server, I get an</FONT></SPAN><SPAN LANG="en-us"> <FONT FACE="Calibri">“</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">I</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">nvalid Drive Specification Error</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">”</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri">. And here is my config line to allow the command in NSClient++:</FONT></SPAN></P>
<UL DIR=LTR><UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">cp_script=nscpp_config.bat</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
</UL></UL>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Calibri">If someone else has done this in past, please let me know</FONT></SPAN><SPAN LANG="en-us"><FONT FACE="Calibri"> how you have done this.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Franklin Gothic Medium">Respectfully,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Franklin Gothic Medium">Jeremy</FONT> <FONT FACE="Franklin Gothic Medium">Leleux</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Franklin Gothic Medium">IT Administrator</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Franklin Gothic Medium">Sunland Construction, Inc.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Franklin Gothic Medium">Corporate Division</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Franklin Gothic Medium">Office: 337.550.2142</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Franklin Gothic Medium">Fax: 337.546.0245</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Franklin Gothic Medium">Mobile: 337.580.6062</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Franklin Gothic Medium">Email: jjleleux@sunlandconstruction.com</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>