Page 1 of 1

Nagios Core Server not responding on NRPE requests

Posted: Thu Jun 21, 2012 1:32 am
by nobody
Hi,

I am using NagiosĀ® Coreā„¢ Version 3.2.3. (NagWin for Nagios) on a windows server 2008 R2, the clients that I am monitoring are also Windows server 2008 R2 machines.

With my Nagios server I am monitoring other servers (clients for nagios), and need to check an external plugin, that I added on my client. I am running NSClient++ to use NRPE on my client servers.
If I am thinking correct, NRPE opens port 5666 on the client, so I tried a telnet session to check if the port on 5666 answers, and i can open a connection to the client server.

Problem is, my Nagios server is not answering on port 5666 if I try to open a telnet session (just to check if it is working) or does it need to answer on another port ?

In my NSClient++ configuration file the Nagios server is in the list of allowed_hosts.

If I try to connect, it gives the following error in Nagios:

CHECK_NRPE: Error - Could not complete SSL handshake

So we gave the -n option with the command, so no ssl is used, and got the following error:

CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.


Anyone an idea ? Already thanks for looking into it ;)

Re: Nagios Core Server not responding on NRPE requests

Posted: Thu Jun 21, 2012 11:36 am
by lmiltchev
Open the NSC.ini file and make sure you have these lines:

Code: Select all

NRPEListener.dll
port=5666
allow_arguments=1
Note: Remove the ";" symbol if any of these lines are commented out.

After making a change in the NSC.ini you must restart the nsclient++ service so that the changes can take effect. You can do this from the DOS command prompt:

Code: Select all

net stop nsclientpp
net start nsclientpp
You may have something like this in the NSC.ini file under the [External Alias] section:

Code: Select all

alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical
Test this one by running the following command in terminal from your nagios machine:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <windows_machine_IP> -t 30 -c alias_mem
Let me know if this helps.

Re: Nagios Core Server not responding on NRPE requests

Posted: Fri Jun 22, 2012 1:46 am
by nobody
Problem solved, sorry, I was giving the input for the external scripts in the wrong section in the nsclient.ini file

Thanks for helping

Re: Nagios Core Server not responding on NRPE requests

Posted: Fri Jun 22, 2012 3:29 pm
by lmiltchev
You are welcome!