Page 1 of 2

Too many NRPE Connection

Posted: Thu Mar 06, 2014 8:10 am
by dhinesh
Hi,
I have implemented monitoring through NRPE. The Nagios is making around 20 NRPE connections on the node., every minute.
Check_Interval is 5mins. All the services are in OK state.

Re: Too many NRPE Connection

Posted: Thu Mar 06, 2014 10:23 am
by tmcdonald
What do you mean by "connections"? Are you talking about packets? TCP connections?

Re: Too many NRPE Connection

Posted: Thu Mar 06, 2014 10:29 am
by dhinesh
I mean to say TCP connections.

Re: Too many NRPE Connection

Posted: Thu Mar 06, 2014 11:29 am
by slansing
How many services are set up to actively check this host via NRPE? Do you perhaps have freshness enabled?

Re: Too many NRPE Connection

Posted: Fri Mar 07, 2014 7:27 am
by dhinesh
There are around 20 services to actively check the host.
The fresheness check is not enabled.

Re: Too many NRPE Connection

Posted: Fri Mar 07, 2014 10:20 am
by technick
I'm still learning nagios, so take this advice with a grain of salt.

How do you know how many connections are being opened per minute vs already established connections?

Are you running custom commands over nrpe that might keep the connection open and if so, have you changed the default timeout value for nrpe?

Have you changed any of the values in your nagios.cfg from the defaults? If so, which have you changed?

I'd start with getting these three questions answered, hopefully this might lead us to the cause.

Re: Too many NRPE Connection

Posted: Fri Mar 07, 2014 12:00 pm
by tmcdonald
technick pretty much hit the nail on the head.

If you have a lot of NRPE checks going, some of those connections might not properly close and appear as open.

Run "netstat -an" on the Nagios server while you see this high number of NRPE connections, and post the output here. Then we can see how many of the connections are ESTABLISHED, CONNECTED, etc.

Re: Too many NRPE Connection

Posted: Wed Mar 12, 2014 4:04 am
by dhinesh
Hi tmcdonald,
Below is output for netstat -an.
-bash-3.2$ netstat -an | grep 5666
tcp 0 0 *.5666 *.* LISTEN

Re: Too many NRPE Connection

Posted: Wed Mar 12, 2014 4:08 am
by dhinesh
Hi technick,

1.How do you know how many connections are being opened per minute vs already established connections?
I was checking the logs for the open connections. Below is the snipet from the logs.
Mar 6 11:24:48 riker inetd[24243]: nrpe/tcp: Connection from chcrsoch601 (172.19.166.78) at Thu Mar 6 11:24:48 2014
Mar 6 11:24:48 riker inetd[24247]: nrpe/tcp: Connection from chcrsoch601 (172.19.166.78) at Thu Mar 6 11:24:48 2014
Mar 6 11:24:48 riker inetd[24248]: nrpe/tcp: Connection from chcrsoch601 (172.19.166.78) at Thu Mar 6 11:24:48 2014
Mar 6 11:24:48 riker inetd[24252]: nrpe/tcp: Connection from chcrsoch601 (172.19.166.78) at Thu Mar 6 11:24:48 2014
Mar 6 11:24:49 riker inetd[24259]: nrpe/tcp: Connection from chcrsoch601 (172.19.166.78) at Thu Mar 6 11:24:49 2014


2.Are you running custom commands over nrpe that might keep the connection open and if so, have you changed the default timeout value for nrpe?
No..
3.Have you changed any of the values in your nagios.cfg from the defaults? If so, which have you changed?
No.

Re: Too many NRPE Connection

Posted: Wed Mar 12, 2014 10:38 am
by slansing
Another thing to look into, how do the current, and next check scheduled times look compared to each other in Home > Service Detail > (host ---> service(s)). It is possible that they are all being scheduled at about the same time, though I agree it is strange that these connections are all made on roughly the same second.