Running Windows batch files through NRPE

Mike Saldivar mike.saldivar at advocatecreditrepair.com
Tue May 19 17:11:20 CEST 2009


On Tue, May 19, 2009 at 8:14 AM, Leleux, Jeremy J <
jjleleux at sunlandconstruction.com> wrote:

>  Hi All,
>
> I’m running Nagios 3.0.6/CentOS 5.2 for my Nagios server.  Its monitoring
> my Windows Servers, all 2003, I have 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 setup commands to
> allow me run the scripts w/ the help of check_nrpe, but they will not run.
>
> Here is the contents of one of my batch files, nscpp_config.bat, to update
> the NSClient++ config:
>
>    @echo off
>
>       xcopy \\10.10.0.50\public\Departments\Infor~1\Scripts\nscpp_copy.bat
>       C:\Progra~1\NSClient++ /Y
>
>       exit
>
> When I try to run this command from my Nagios Server, I get an “Invalid
> Drive Specification Error”.  And here is my config line to allow the
> command in NSClient++:
>
>    cp_script=nscpp_config.bat
>
>
Does the user running the batch file have access to those directories and
shares?  Does it work if you run it from the command line?
You may want to try first mapping the drive with net use:

net use n: \\10.10.0.50\public
xcopy n:\Departments\Infor~1\Scripts\nscpp_copy.bat C:\Progra~1\NSClient++
/Y

With net use, you can also specify an alternate username and password with
which to map the drive.

-Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090519/8d37391f/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list