CHECK_NRPE: Socket timeout after 10 seconds error

Hi there,

I am trying to set up monitoring of my Scalix email server. I have several plugins that are working correctly but I have some that are all returning the following error:

CHECK_NRPE: Socket timeout after 10 seconds

I can run the commands locally and get the correct reponse but it will not work through NRPE. The only thing that I can see is that all the ones that are failing have a sudo command as shown below:

command[check_local_sxqueue]=sudo /usr/local/nagios/libexec/check_queues.py -c 100 -w 75 -q LOCAL
command[check_router_sxqueue]=sudo /usr/local/nagios/libexec/check_queues.py -c 100 -w 75 -q ROUTER
command[check_smtp_sxqueue]=sudo /usr/local/nagios/libexec/check_queues.py -c 100 -w 75 -q SMINTFC
command[check_error_sxqueue]=sudo /usr/local/nagios/libexec/check_queues.py -c 100 -w 75 -q ERROR
command[check_unix_sxqueue]=sudo /usr/local/nagios/libexec/check_queues.py -c 100 -w 75 -q UNIX
command[check_sxdaemons]=sudo /usr/local/nagios/libexec/check_daemons.py -d
command[check_sxservices]=sudo /usr/local/nagios/libexec/check_daemons.py -s

Can anyone help me resolve this?

I guess you have set up sudoers properly for the nrpe user (nagios?) on the Scalix, so it’s not waiting for a password I.e. if you test one of those sudo commands logged in as that user, it funtions ok?
You might also check that requiretty is commented out…

This is the error I get when I run the command while logged in as the nagios user.

WARNING - Unable to ascertain Scalix daemons or services status
omstat : [OM 8020] Invoker is not superuser or an Scalix administrator;;
-sh-3.00$ ./check_daemons.py -s

I have made the change to the sudoers file but it does not seem to work.

cedross

I have made some changes and now get the following:

NRPE: Unable to read output.

The following is what shows up in the event log.

[01-20-2009 14:10:01] Warning: Attempting to execute the command “/usr/bin/printf “%b” “***** Nagios 2.6 ****\n\nNotification Type: PROBLEM\n\nService: Scalix Services\nHost: Scalix Server #1\nAddress: 10.0.1.235\nState: WARNING\n\nDate/Time: Tue Jan 20 14:10:01 EST 2009\n\nAdditional Info:\n\nNRPE: Unable to read output" | /usr/bin/mail -s " *PROBLEM alert - Scalix Server #1/Scalix Services is WARNING **” [email protected]” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
Service Notification[01-20-2009 14:10:01] SERVICE NOTIFICATION: scalix-admin;Scalix-Server-01;Scalix Services;WARNING;notify-by-email;NRPE: Unable to read output

Can some one help me out. Thanks.

cedross

[quote]WARNING - Unable to ascertain Scalix daemons or services status
omstat : [OM 8020] Invoker is not superuser or an Scalix administrator;;
-sh-3.00$ ./check_daemons.py -s[/quote]

You need to fix this first to ensure your nagios user on the Scalix box is in such required groups as to make it have Sacalix admin priveleges. You will probably have to consult the scalix documentation to resolve this.

This seems to indicate that the path to either printf (/usr/bin/printf) or mail (/usr/bin/mail) is not correct. Probably the later - is sendmail installed and configured correctly, or are you using some other mail program (in which case you will need to alter the notify-by-email command objects appropriately)?

HTH

/S

Thanks. I have managed to get it fixed. I gave explicit permission for the nagios user to the required plugins through the sudoers file.

cedross