-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes 431 by offering configurable startup host for testing SSH probe * Documentation enhancement for #431 * CHANGES update for #431 #432 * Update SSH.pm add missing , --------- Co-authored-by: Ryan Rawdon <[email protected]> Co-authored-by: Tobias Oetiker <[email protected]>
- Loading branch information
1 parent
b6cc486
commit 1e59dad
Showing
2 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,11 @@ The Probe asks the given host n-times for it's public key, where n is | |
the amount specified in the config File. | ||
As part of the initialization, the probe asks 127.0.0.1 for it's public key | ||
and tries to parse the output. Make sure you have SSH running on the | ||
localhost as well. | ||
and tries to parse the output. This is to ensure that the specified ssh-keyscan | ||
binary provides output in the expected formatm before relying on it.Make sure | ||
you have SSH running on the localhost as well, or specify an alternative | ||
init_host target to test against, that is expected to be available during any | ||
smokeping restart. | ||
DOC | ||
authors => <<'DOC', | ||
Christian Recktenwald <[email protected]> | ||
|
@@ -55,7 +58,7 @@ sub new($$$) | |
# no need for this if we run as a cgi | ||
unless ( $ENV{SERVER_SOFTWARE} ) { | ||
|
||
my $call = "$self->{properties}{binary} -t dsa,rsa,ecdsa 127.0.0.1"; | ||
my $call = "$self->{properties}{binary} -t dsa,rsa,ecdsa $self->{properties}{init_host}"; | ||
my $return = `$call 2>&1`; | ||
if ($return =~ m/$ssh_re/s){ | ||
print "### parsing ssh-keyscan output...OK\n"; | ||
|
@@ -135,7 +138,12 @@ sub probevars { | |
-x $val or return "ERROR: binary '$val' is not executable"; | ||
return undef; | ||
}, | ||
}, | ||
}, | ||
init_host => { | ||
_doc => "Host to use for initialization, defaults to IPv4 localhost of 127.0.0.1", | ||
_example => '127.0.0.1', | ||
_default => '127.0.0.1', | ||
} | ||
}) | ||
} | ||
|
||
|