Page 1 of 1

Not able to get the output through NRPE

Posted: Sun Apr 06, 2014 2:53 pm
by arun.tp
Hi i have install nagios3.4.1 and nagios-nrpe-pluggins on my nagios server.
but when i check for correctness i get the folowing output

$ sudo /usr/lib/nagios/plugins/check_nrpe -H localhost
Connection refused by host


im not able to get the output from my client server. even though i have allowed the nagios server ipaddress on nrpe.cfg on the client server.

This is the following ouput i get when i try to check the disk space of the client server..
/usr/lib/nagios/plugins/check_nrpe -H <client-server-ip> -c check_disk
CHECK_NRPE: Socket timeout after 10 seconds.


Im sure this is a networking issue as im NOT able to telnet from the nagios-server to client-server or vice-versa

Please help me fix this issue.

Re: Not able to get the output through NRPE

Posted: Mon Apr 07, 2014 9:17 am
by kalyan1709
Have you checked whether port 5666 is listining or not from Nagios server?

# telnet server_IP 5666

Re: Not able to get the output through NRPE

Posted: Mon Apr 07, 2014 11:55 am
by abrist
Run an nmap against the client ip:

Code: Select all

nmap <client-server-ip> -p 5666
Check the logs on the client server and the nagios server:

Code: Select all

tail -20 /var/log/messages

Re: Not able to get the output through NRPE

Posted: Fri Apr 11, 2014 6:12 am
by mkot
Did you add 5666 port to your /etc/services? Check it and paste output:

Code: Select all

less /etc/services |grep 5666
Are nrpe running?

Code: Select all

ps aux |grep nrpe
Do you run nrpe via xinetd/inetd or standalone daemon? If xinetd make sure that in /etc/xinetd.d/nrpe you have sth like this:

Code: Select all

# 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 -i
        log_on_failure  += USERID
        disable         = no
        only_from       = <allowed_ip, eg 127.0.0.1>   // I deleted this line at my Nagios server, try it to
}
Is xinetd running?

Code: Select all

 ps aux |grep xinetd
If not, try

Code: Select all

service xinetd start

Re: Not able to get the output through NRPE

Posted: Fri Apr 11, 2014 12:19 pm
by sreinhardt
Thanks for the good advice Mkot, let us know how it goes arun.