Problems: CHECK_NRPE: Socket timeout after 10 seconds.

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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by slansing »

We need to see the actual command as it is ran from the Nagios command line, example:

Code: Select all

/../../check_nrpe -H remote.host.ip. -c check -a arguments
etc..
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

It's ok. I just purge everything. It looks like I had a previous installation that I think the current installation was fighting against. Not entirely sure. Going to reinstall everything and see how it goes. I didn't have this the first time I installed it on our system; but for some reason we decided to purge that server and as such we attempted to remove nagios but I don't believe it was actually truly removed. As well the last installation was done with the package manager but this installation was done from source.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by sreinhardt »

Oh yes packages vs source and having multiple versions installed certainly can cause issues. Let us know how it goes!
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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by lmiltchev »

Can you show the command definition of "check_procs" in the nrpe.cfg file on the client, and the exact command that you are running from the command line, along with the output of it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

sreinhardt wrote:Oh yes packages vs source and having multiple versions installed certainly can cause issues. Let us know how it goes!

Yes I just hope I got it all this time.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by lmiltchev »

We will keep the topic open, so keep us updated.
Be sure to check out our Knowledgebase for helpful articles and solutions!
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

Ok. I got it all ironed out (well mostly). It looks like I didn't sudo or wasn't root in a couple of spots when I installed the nagios plugins and nrpe. I just kinda zipped through it without paying attention and that is where a lot of the problems were coming from.

Somehow we need to tell everyone doing instructions (for Debian or Ubuntu) that it's not openssl-dev it's libssl-dev, which is the package you want. If I were a noob (and I am barely more than a noob) I would never think to try libssl-dev when most places say to use apt-get install openssl-dev. I don't know if anyone else has experienced this.

The only I was having after that is with Total Processes. In the remote nrpe.cfg it's defined as:

Code: Select all

 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s 
  command[check_local_procs]=/usr/local/nagios/libexec/check_procs -w 150 -200
I'm not sure if you are supposed to pick one (that's what I ended up doing just using the local and I commented the other one out) or if they are aggregate at the end or what. I changed it to:

Code: Select all

### command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s 
  command[check_procs]=/usr/local/nagios/libexec/check_procs -w 150 -200

and now it's running fine. I really don't need zombie processes. But I'm going to try and figure that out just because....it'll bug me if I don't.

I know there are 100 different directions out there but I wrote up some for Ubuntu 12.04 precisesly how I did it, which I use and it seems to install perfectly everytime. It doesn't vary too much from what the team puts out....anyway my point is that I was going to write it all out Nagios->Nagios-Plugins->NRPE instructions for Ubuntu 12.04....and I can test it on one of my servers at home. Then maybe some of you fine people can mull over it than I'll throw it up on Ubuntu Forums and possibly help guide someone else. If that's cool with everyone here.
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by yancy »

psyllex,

What is the check_procs definition in etc/nrpe.cfg (on the client machine)

-Yancy
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by psyllex »

yancy wrote:psyllex,

What is the check_procs definition in etc/nrpe.cfg (on the client machine)

-Yancy
The definition on the client (remote host) is the one I posted above. Which is the:

Code: Select all

command[check_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
That is the one I changed a little to match the definition on the server which actually had two definitions for check_procs
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Problems: CHECK_NRPE: Socket timeout after 10 seconds.

Post by abrist »

You should be able to use both of the remote commands. You just need to remember to change the command that the service definition (on the nagios server) uses if you change the command name in the remote nrpe.cfg file. I assume the service definition command on the nagios server was "check_procs" not "check_local_procs" which is why changing the nrpe command name to "check_procs" resolved the issue.
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.
Locked