Page 1 of 1
timeout value for check_ssh test
Posted: Tue Mar 25, 2014 1:28 pm
by itIsMrKevin
Hi,
We are using Nagios Core version 3.2.3.
1) What is the name of the configuration file where you can change the timeout value for the ssh service test?
2) What is the location of that file?
Any help on this would be greatly appreciated?
Re: timeout value for check_ssh test
Posted: Tue Mar 25, 2014 4:29 pm
by abrist
Well, it can be a few different places depending on your configuration. First, look at the commands.cfg file for the check_ssh_test command. You may find a timeout declared there (-t n). Otherwise, you may want to add "-t <seconds>" to the command. If "-t" is declared, but the interval is replaced by and $ARGn$, then you want to specify your interval in the $ARGn$ for the actual service check.
If you have doubts, post the check_ssh_test command configuration and the associated service check definition and we will take a look.
Re: timeout value for check_ssh test
Posted: Wed Mar 26, 2014 9:03 am
by itIsMrKevin
Hi abrist,
Thanks for the reply. I looked in the commands.cfg file.
I found the following definition for check_ssh:
# 'check_ssh' command definition
define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
I don't see that time is declared there at all.
1) How could I modify this if I want the time for the ssh check to be 30 seconds?
Thanks.
Re: timeout value for check_ssh test
Posted: Wed Mar 26, 2014 9:30 am
by tmcdonald
itIsMrKevin wrote:I don't see that time is declared there at all.
1) How could I modify this if I want the time for the ssh check to be 30 seconds?
abrist wrote:You may find a timeout declared there (-t n). Otherwise, you may want to add "-t <seconds>" to the command. If "-t" is declared, but the interval is replaced by and $ARGn$, then you want to specify your interval in the $ARGn$ for the actual service check.
You will want to put "-t <seconds> in your service definition for the $ARG1$ variable.
abrist wrote:If you have doubts, post the check_ssh_test command configuration and the associated service check definition and we will take a look.
Please provide the service definition if you have doubts.
Re: timeout value for check_ssh test
Posted: Wed Mar 26, 2014 10:22 am
by technick
itIsMrKevin wrote:Hi abrist,
Thanks for the reply. I looked in the commands.cfg file.
I found the following definition for check_ssh:
# 'check_ssh' command definition
define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
I don't see that time is declared there at all.
1) How could I modify this if I want the time for the ssh check to be 30 seconds?
Thanks.
Your new command will look like this
Code: Select all
command_line $USER1$/check_ssh -t 30 $ARG1$ $HOSTADDRESS$
Re: timeout value for check_ssh test
Posted: Wed Mar 26, 2014 1:11 pm
by abrist
technick wrote:Your new command will look like this
Code: Select all
command_line $USER1$/check_ssh -t 30 $ARG1$ $HOSTADDRESS$
Technick is correct, let us know if this solves the timeout issues for you!
Re: timeout value for check_ssh test
Posted: Wed Apr 02, 2014 9:59 am
by itIsMrKevin
Hi,
This did resolve the issue for me. Feel free to close out this case. Thanks.