Nagios 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
alceryes
Posts: 41
Joined: Wed Sep 28, 2011 11:05 am

Nagios NRPE

Post by alceryes »

I'm trying to get NRPE checks going but I'm running into difficulties. We have Nagios (on Ubuntu) up and running and checking servers just fine.
The steps I've followed so far -

Installed NRPE plugin (and dependencies) on our Nagios server
Modified NSC.ini in the NSClient++ directory on the target server, allowing the NRPEListener.dll, changed the allow arguments part under [NRPE], and added check_adhealth=C:\Program Files\NSClient++\scripts\Check_AD.exe to the [NRPE Client Handlers] section
Put the Check_AD.exe in the proper scripts folder
Added this to commands.cfg:
define command{
command_name check_nrpe
command_line /$USER1$/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$
}
Added this to windows.cfg
define service{
use generic-service
host_name <server name>
service_description Check AD Health
check_command check_nrpe!check_adhealth
}
Restarted nagios services and NSClient++ service on target server

Getting error "CHECK_NRPE: Error receiving data from daemon." in Nagios

...I'm not sure what else needs to be done as there is a plethora of different instructions on the WWW. Do I need to install an NRPE program on the windows server? Also is there a way to test whether NRPE is installed correctly on the Nagios server?

TIA!
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Nagios NRPE

Post by agriffin »

Did you add your Nagios server's IP address to the allowed hosts in NSC.ini?
alceryes
Posts: 41
Joined: Wed Sep 28, 2011 11:05 am

Re: Nagios NRPE

Post by alceryes »

Yes, the allowed hosts line is there.
We've had Nagios monitoring this server for a while now. It's just the check_adhealth NRPE part that isn't working.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NRPE

Post by slansing »

Could you please show how you are entering the check into the Nagios terminal to test it?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Nagios NRPE

Post by agriffin »

Did you define check_adhealth as an NRPE command on the remote host?
alceryes
Posts: 41
Joined: Wed Sep 28, 2011 11:05 am

Re: Nagios NRPE

Post by alceryes »

slansing - I am not testing manually (not sure how). I have the check defined in the Nagios commands.cfg and am trying to check a server listed in the windows.cfg. Those two commands are in my original post. If you could tell me how to manually test that'd be great, thx!

agriffin - Are you referring to the check_adhealth=C:\Program Files\NSClient++\scripts\Check_AD.exe in the NSC.ini or the commands.cfg entry?


Thanks for your help guys!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios NRPE

Post by slansing »

It seems as if the daemon is not connecting properly to Nagios. Under etc/xinetd.d/nrpe make sure that under USER, it is set as nagios

Code: Select all

user              =nagios
and that only_from is set to your Nagios server's IP

Code: Select all

only from       =your.nagios.ip.address
Assuming NSClient++ is set up properly on the Windows host's side, you can view log messages from the INSTALLDIRECTORY/nsclient.txt

Once here it is easy to see if the connection is being disrupted on the Windows side, or if it does not show up at all, the Nagios side.
Locked