Not able to get the output through 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
arun.tp
Posts: 1
Joined: Fri Nov 08, 2013 2:06 am

Not able to get the output through NRPE

Post 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.
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: Not able to get the output through NRPE

Post by kalyan1709 »

Have you checked whether port 5666 is listining or not from Nagios server?

# telnet server_IP 5666
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Not able to get the output through NRPE

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mkot
Posts: 68
Joined: Tue Feb 25, 2014 1:47 am
Location: Poland

Re: Not able to get the output through NRPE

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Not able to get the output through NRPE

Post by sreinhardt »

Thanks for the good advice Mkot, let us know how it goes arun.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked