Checking Windows Servers with NRPE

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
ICAART
Posts: 3
Joined: Mon Mar 21, 2011 5:43 pm

Checking Windows Servers with NRPE

Post by ICAART »

Hello,

I have been trying to get my nagios installation to check my windows servers and am sure I am missing a step. This is what I have so far:

I am running the latest NSClient++ on my windows server. From the Nagios host I can run "check_nrpe -H hostaddress" to my windows box and it responds with "seems to be doing fine".

I am stuck on how to move on to the next step and actually use NRPE to check the Windows server disk space. On the nagios box if I type something like "check_nrpe -H hostaddress -c get_disk" it responds with "No handler for that command".

What do I need to do to start monitoring my windows box? I've searched the internet and have not found any relevant answers for this issue or the No Handler error message.

If you need me to post up any config files plase let me know.

Thanks for your assistance.

PT
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Checking Windows Servers with NRPE

Post by mguthrie »

There's a pdf in the NSClient installer folder that gives the best breakdown on how to get it up and running. Also look in the nsc.ini file on the windows machine for the list of predefined commands that you can use. That ini file is internally documented so read through the notes inside to set up what you need.
ethantester123
Posts: 4
Joined: Thu Apr 07, 2011 8:19 am

Re: Checking Windows Servers with NRPE

Post by ethantester123 »

Well i have refereed both the online document & the pdf files in the NSClient folder (by the way both are the same). But even i am stuck at this point.

What i am able to do is run some of the nrpe command like CheckMEM from my command line of the linux nagios machine- and it does show the correct values.

But when i try to create an command definition & service definition in .cfg files all i get is "(Return code of 127 is out of bounds - plugin may be missing) ".

I read somewhere that we can create these definitions in nsc.ini file as alias definitions of the windows host. and call it like
"commnand_line check_nrpe!alias_mem" in our service definitions.
But all this does is show the " seems to be working fine" message.

Some one please help me with getting nrpe to work with windows!!!!!!
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Checking Windows Servers with NRPE

Post by rdedon »

From the other post I am going to add the comments here as it may be helful to others. Thanks ethantester123
ethantester123 wrote:After going through n no of steps and searching many sites i finally got my nrpe CheckMEM working. Thanks to this post i got to the final step.

Here are the steps that i had to follow - right from the beginning:
1. Configure the NSC.ini host file correctly on windows host machine with following parameters:
a. Enable module NRPEListener.dll
b. Enable CheckExternalScripts.dll
c. Enable [NRPE] port no i.e port=5666
d. Enable [NRPE] arguments i.e allow_arguments=3 (can be any number you want)

2. Execute the CheckMEM command from command line as follows
/usr/local/nagios/libexex/check_nrpe -H 12.345.567.890 -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll=long type=physical

3.Create the command and service definitions in nagios cfg files as follows:
define command{
command_name check_nrpe_mem
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckMEM -a MaxWarn=80% MaxCrit=90% ShowAll=long type=page
}

define service{
use generic-service
host_name myhost
service_description Memory Usage
check_command check_nrpe_mem
}

4. Saved and restarted nagios.. And it worked exactly as i want.

I hope this info helps any one facing such problem

Note: I am using a Fedora virtual machine for my nagios monitoring server.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked