Page 1 of 2

CHECK_BY_SSH intermittant

Posted: Thu Feb 27, 2014 2:13 pm
by redeming
I am having problems with the following message being received from check_by_ssh to remote Linux systems. (Return code of 255 is out of bounds)

This is an intermittent problem that occurs with a number of hosts but not all of them and only from time to time.

Running the full check from the command line manually works every time. The systems are not overly busy and respond well to other ssh requests.

check_by_ssh -H $HOSTADDRESS$ -l <username> -C "/nfs/imo/imofile2/user/tools/nagios/libexec/check_disk -w20% -c10% -p/var"

Username has the user on the remote system.

Re: CHECK_BY_SSH intermittant

Posted: Thu Feb 27, 2014 5:44 pm
by abrist
Do you experience the issue when running the command from the cli? If so, could you increase the timeout and try to reproduce the issue again?

Code: Select all

check_by_ssh -H $HOSTADDRESS$ -l <username> -t 60 -C "/nfs/imo/imofile2/user/tools/nagios/libexec/check_disk -w20% -c10% -p/var"

Re: CHECK_BY_SSH intermittant

Posted: Thu Feb 27, 2014 6:13 pm
by redeming
As noted previously, it works EVERY time.

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 12:04 pm
by lmiltchev
You mean it works every time from the CLI, but works intermittently in the GUI correct? Can you post the service definition?

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 12:41 pm
by redeming
Yes, every time I run the service check from the command line using check_by _ssh it works. It is only when it is run automatically that it does not run. It will run often, but not all of the time. Changing the time out had no effect.

Here is the configuration.

###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2014-02-27 13:16:50
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define service {
service_description Unix - Check Var Directory
use generic-service
hostgroup_name Var Monitoring
display_name Unix - Check Var Directory
servicegroups Linux - Standard
check_command check_xi_by_ssh!<username>!"/nfs/imo/imofile2/user/tools/nagios/libexec/check_disk -w20% -c10% -p/var"!!!!!!
contact_groups Var System Monitoring
register 1
}

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################


Thanks

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 12:48 pm
by cunningrat
Redeming, I had a similar issue: checks would alert with the return code of "Plugin timed out while executing system call". Increasing the timeout value (the -t flag to check_by_ssh) fixed the problem.

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 1:02 pm
by scottwilkerson
@cunningrat - Thanks. I would have suggested the same thing...

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 2:32 pm
by redeming
The error I get does not seem to reflect a time out. Additionally, as mentioned in my last post, I tried increasing the timeout.

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 3:01 pm
by slansing
Is this happening with every plugin you are trying to execute via check_by_ssh?

Re: CHECK_BY_SSH intermittant

Posted: Fri Feb 28, 2014 3:32 pm
by redeming
Yes.