NRPE Timeout

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
axj0187
Posts: 14
Joined: Thu Jul 07, 2011 10:47 am

NRPE Timeout

Post by axj0187 »

NRPE agent has been running fine for weeks now. Then out of nowhere I started getting "CHECK_NRPE: Socket timeout after 30 seconds." errors, but only on service checks using check_init_service, everything else (CPU,Disk,Mem) is returning OK. This is very strange. Any suggestions?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Timeout

Post by lmiltchev »

Can you run the "check_init_service" from the command line and post the output?

You can obtain some additional information on command line testing by reading here:

http://support.nagios.com/wiki/index.ph ... k_Commands
Be sure to check out our Knowledgebase for helpful articles and solutions!
axj0187
Posts: 14
Joined: Thu Jul 07, 2011 10:47 am

Re: NRPE Timeout

Post by axj0187 »

Do you mean on the machine I am monitoring?

If so:

./check_init_service sshd
sshd (pid 3349 2504 1971) is running...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE Timeout

Post by lmiltchev »

You can try increasing the value for the timeout in your command definition, for example you may have:

Code: Select all

define command {
       command_name                             check_nrpe
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Try changing "-t 30" to "-t 60" or "-t 90".

After this, run in terminal:

Code: Select all

# service nagios restart
and see if you are still getting a timeout message.
Be sure to check out our Knowledgebase for helpful articles and solutions!
axj0187
Posts: 14
Joined: Thu Jul 07, 2011 10:47 am

Re: NRPE Timeout

Post by axj0187 »

Now after a little while it returns with NRPE: Unable to Read Output. Ive been hacking away at this for a day now and have no idea what else to try, any other ideas?

Thanks for the help.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: NRPE Timeout

Post by nscott »

That error generally means that plugins have been moved or the check_command (on the remote box) was redefined. (On the remote box) Make sure you're plugins are still in /usr/local/nagios/libexec, are executable by the user nagios, and make sure (on the remote box) that the check commands, usually in the /usr/local/nagios/etc/ are properly setup.
Nicholas Scott
Former Nagios employee
axj0187
Posts: 14
Joined: Thu Jul 07, 2011 10:47 am

Re: NRPE Timeout

Post by axj0187 »

I removed sudo from the command definition and this fixed the problem. Thanks.
Locked