timeout value for check_ssh test

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.
Locked
itIsMrKevin
Posts: 28
Joined: Tue Oct 23, 2012 1:28 pm

timeout value for check_ssh test

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: timeout value for check_ssh test

Post 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.
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.
itIsMrKevin
Posts: 28
Joined: Tue Oct 23, 2012 1:28 pm

Re: timeout value for check_ssh test

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: timeout value for check_ssh test

Post 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.
Former Nagios employee
technick
Posts: 49
Joined: Tue Feb 04, 2014 10:30 am
Location: Denver, CO

Re: timeout value for check_ssh test

Post 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$
----------------------
Nagios Jedi in training.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: timeout value for check_ssh test

Post 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!
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.
itIsMrKevin
Posts: 28
Joined: Tue Oct 23, 2012 1:28 pm

Re: timeout value for check_ssh test

Post by itIsMrKevin »

Hi,

This did resolve the issue for me. Feel free to close out this case. Thanks.
Locked