check_by_ssh timeouts / how to work around?

Matthew Pounsett matt at conundrum.com
Mon Oct 6 19:27:41 CEST 2008


>
> I believe this to be caused by the check itself is timing out. As when
> I try to login it will sometimes take up to a minute or two just to
> get a prompt.
>


As for setting the timeouts for that sort of thing, this is what I do.

In my resource.cfg:
--
# check_by_ssh timeout
$USER4$=10
--

.. and in my commands.cfg definitions..
---
# 'check_disk_remote' command definition
define command {
     command_name    check_disk_remote
     command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -t $USER4$ - 
C "$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$"
}
---

And I use the same $USER4$ definition for all of the check_by_ssh  
calls, so that it's easy to tune.

Have you looked into the reason for the long login delay though?  I  
think I'd start there.  A 60 second wait for ssh to get you a shell  
indicates some sort of problem.  Either the target machine is so  
resource starved that it can't negotiate the authentication and  
encryption, or you've got some other delay in there.  The most likely  
culprit to my mind is DNS -- ssh itself, login and your shell on the  
target machine might all be trying to do a reverse DNS lookup on the  
source of the connection.  If that's timing out, it could cause very  
long delays.   There are lots of other potential problems, but I'd  
start looking there.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20081006/bc46b789/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list