Not able to configure remote nrpe plugins for nagios

2.9k Views Asked by At

I have installed nagios server including nrpe & nagios plugins. Its working properly.
However I am trying to install nrpe & nagios plugins for remote host monitoring using nagios server, After the configuration is done & I am running below command for testing:

/usr/local/nagios/libexec/check_nrpe -H localhost

Output:

CHECK_NRPE: Socket timeout after 10 seconds.  (And for some of the services its giving)
CHECK_NRPE: Error - Could not complete SSL handshake. 

The port 5666 is listening on that server.

Can anyone please let me know what other changes to be made to get proper results of the above command.

Also please let me know if you need any more details about the configurations.

3

There are 3 best solutions below

0
On

You may need to check firewall.

Also make sure that both nagios and nrpe daemons are running.

0
On

You should have the openssl and openssl-devel installed

aptitude install openssl openssl-devel

Are you using Xinetd?

If you are, you should check the service configuration in /etc/xinetd.d/nrpe

You shoud have something like this:

# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe{
        flags           = REUSE
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        only_from       = 127.0.0.1 <YouNagiosServerIP>
}

And Finally:

service xinetd restart
0
On

Sometimes this might also mean that the server is trying to perform a check with SSL while the NRPE daemon is not running with the SSL option (or the other way around).

Could you try running the check like below ?

/usr/local/nagios/libexec/check_nrpe -H localhost -n