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!
Nagios NRPE
Re: Nagios NRPE
Did you add your Nagios server's IP address to the allowed hosts in NSC.ini?
Re: Nagios NRPE
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.
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
Could you please show how you are entering the check into the Nagios terminal to test it?
Re: Nagios NRPE
Did you define check_adhealth as an NRPE command on the remote host?
Re: Nagios NRPE
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!
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
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
and that only_from is set to your Nagios server's IP
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.
Code: Select all
user =nagiosCode: Select all
only from =your.nagios.ip.addressOnce 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.