diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-09-28 19:58:32 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-09-28 19:58:32 +0200 |
commit | 397a932de585aa078c5c2a1fceae10c3e85093ee (patch) | |
tree | 4e753b0960092521ea5498c98d6936c13f1daa45 /lib/Smokeping | |
parent | e8783b5de226f8c5e338e04c38aa4b692c986fd8 (diff) | |
download | smokeping-397a932de585aa078c5c2a1fceae10c3e85093ee.tar.gz smokeping-397a932de585aa078c5c2a1fceae10c3e85093ee.tar.xz |
* allow the slave name to be configured
* be more liberal in what is allowed for slave names
* allow port configuration in the SSH probe
Diffstat (limited to 'lib/Smokeping')
-rw-r--r-- | lib/Smokeping/probes/SSH.pm | 12 |
1 files changed, 9 insertions, 3 deletions
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 <keytype>", + _doc => "Type of key, used in ssh-keyscan -t I<keytype>", _re => "[dt]sa1*", _example => 'dsa', - _default => 'rsa', + _default => 'rsa', + }, + port => { + _doc => "Port to use when testing the ssh connection -p I<port>", + _re => "\d+", + _example => '5000', + _default => '22', }, }) } |