From 397a932de585aa078c5c2a1fceae10c3e85093ee Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Fri, 28 Sep 2007 17:58:32 +0000 Subject: * allow the slave name to be configured * be more liberal in what is allowed for slave names * allow port configuration in the SSH probe --- lib/Smokeping/probes/SSH.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/Smokeping') diff --git a/lib/Smokeping/probes/SSH.pm b/lib/Smokeping/probes/SSH.pm index 7756c03..4bcad76 100644 --- a/lib/Smokeping/probes/SSH.pm +++ b/lib/Smokeping/probes/SSH.pm @@ -82,7 +82,7 @@ sub pingone ($){ my $host = $target->{addr}; - my $query = "$self->{properties}{binary} -t $target->{vars}->{keytype} $host"; + my $query = "$self->{properties}{binary} -t $target->{vars}->{keytype} -p $target->{vars}->{port} $host"; my @times; # get the user and system times before and after the test @@ -129,10 +129,16 @@ sub targetvars { my $class = shift; return $class->_makevars($class->SUPER::targetvars, { keytype => { - _doc => "Type of key, used in ssh-keyscan -t ", + _doc => "Type of key, used in ssh-keyscan -t I", _re => "[dt]sa1*", _example => 'dsa', - _default => 'rsa', + _default => 'rsa', + }, + port => { + _doc => "Port to use when testing the ssh connection -p I", + _re => "\d+", + _example => '5000', + _default => '22', }, }) } -- cgit v1.2.3-24-g4f1b