Too many NRPE Connection

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dhinesh
Posts: 15
Joined: Tue Nov 12, 2013 4:58 am

Re: Too many NRPE Connection

Post by dhinesh »

Hi Slansing,
The check_interval is 5mins., so if the checks are being scheduled at the same., i should see mutilple connections made only every 5mins.
But here every minute the connections are made in high number.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Too many NRPE Connection

Post by abrist »

Are you using xinetd with nrpe? If so, you may need to increase the per source limit of xinetd.

From the NRPE troubleshooting doc:
http://assets.nagios.com/downloads/nagi ... utions.pdf
This cause is rare, but worth mentioning. If you use your remote host's nrpe server as a nrpe node proxy (sending all checks for the
network segment to a single nrpe enabled server behind a firewall), or if you are doing a large number of nrpe checks in relatively short
time period on one remote host, you may hit the maximum connection limit of nrpe. This is technically an xinetd setting and can be
uncapped by editing the file:

Code: Select all

/etc/xinetd.d/nrpe
Add the following lines to the definition:

Code: Select all

per_source = UNLIMITED
instances = UNLIMITED
And then restart nrpe:

Code: Select all

service xinetd restart
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.
dhinesh
Posts: 15
Joined: Tue Nov 12, 2013 4:58 am

Re: Too many NRPE Connection

Post by dhinesh »

Hi Abrist,
NRPE is runs under inetd. It is an HP-UX server.
Below is inetd entry for NRPE.
nrpe stream tcp nowait nagios /opt/nrpe/bin/nrpe nrpe -i -c /opt/nrpe/etc/nrpe.cfg
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Too many NRPE Connection

Post by abrist »

Are the checks getting updated in the UI every minute? Or do they only update every 5minutes like configured? If they are indeed updating every minute on the details page, then there may be an issue with interval configuration or with inherited checks from a hostgroup/template/servicegroup/etc.
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.
dhinesh
Posts: 15
Joined: Tue Nov 12, 2013 4:58 am

Re: Too many NRPE Connection

Post by dhinesh »

Hi Abrist,
The checks are updating every 5min in UI as defined in the check_interval.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Too many NRPE Connection

Post by slansing »

Okay, so what that is basically saying is that either those connections are just 'ghost' connections of some sort, or that they are being held open on the remote host by something other than Nagios. We should see the checks being updated much more rapidly in the XI interface if they are actually running additional checks against that system and returning them. Are additional copies of the NRPE daemon actually running on the system?
dhinesh
Posts: 15
Joined: Tue Nov 12, 2013 4:58 am

Re: Too many NRPE Connection

Post by dhinesh »

Hi Slansing,
How can I check whether the additional copies of NRPE are running.
I see the NRPE is running under inetd. And 'ps -ef | grep nrpe' is also not showing any nrpe process.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Too many NRPE Connection

Post by scottwilkerson »

If it is running under inetd running

Code: Select all

ps -ef | grep nrpe
should show all processes. If it show nothing it is likely not running

you could run

Code: Select all

netstat -pln|grep 5666
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Too many NRPE Connection

Post by lmiltchev »

If nrpe were running as a stand along daemon, you would see something like this:

Code: Select all

ps -ef | grep nrpe
nagios    1522     1  0 Feb24 ?        00:02:03 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
BTW, have you tried restarting the inetd daemon?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked