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_remotecommand_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.
PGP.sig
Description: This is a digitally signed message 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=/
_______________________________________________ Nagios-users mailing list Nagios-users@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