Monitoring Windows Servers with NagiosCore with scripts

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
TNTGav
Posts: 5
Joined: Tue Apr 17, 2012 7:36 am

Monitoring Windows Servers with NagiosCore with scripts

Post by TNTGav »

Hello all,

I've spent quite a while getting my head around how Nagios works and I feel I have a relatively good grip of it now but there is one thing that is confusing me.

Lets say I have 200 remote hosts, and I find a script on Nagios Exchange that I want to run against them. As I understand the concept of NSClient++ and NRPE, I'd have to manually put the script (lets say a VBS) on these servers and then execute it somehow through NSClient++ strings.

My question: am I thinking about this wrong. How can I run say VBS/PS code against remote servers without having to get a script out to 200 servers. Can someone give an example or point to a tutorial for running something that isn't one of the default plugins for NSClient++ or NRPE.

Thanks in advance for any advice!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Monitoring Windows Servers with NagiosCore with scripts

Post by jsmurphy »

You can't.

If you want to use NSClient or NRPE to check a remote server it needs a local copy of the script to execute. Distribution and version maintenance is usually done by your companies package management solution or your automation solution (i.e. chef or puppet).

There isn't really a way around this, you could rely on alternative plugins like check_wmi_plus but you would be limiting your monitoring options.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring Windows Servers with NagiosCore with scripts

Post by slansing »

In addition if you would like an example of a simple script that gets executed on a remote server please see this document set.
It is from the perspective of a Nagios XI Admin but it should serve the purpose of showing you the steps without reading up on NSClient++ or NRPE documents:

http://library.nagios.com/library/produ ... -nagios-xi
Locked