Merge branch 'ent-3451-retoques-ipam' into 'develop'
added pandora_block_ping to check response of multiple addresses See merge request artica/pandorafms!2147 Former-commit-id: 6adf7e7f59beba0d1f579ab267fd40d0c21a24c4
This commit is contained in:
commit
5bc10915da
|
@ -112,6 +112,7 @@ our @EXPORT = qw(
|
|||
md5_init
|
||||
pandora_ping
|
||||
pandora_ping_latency
|
||||
pandora_block_ping
|
||||
resolve_hostname
|
||||
ticks_totime
|
||||
safe_input
|
||||
|
@ -1273,6 +1274,24 @@ sub pandora_ping_latency ($$$$) {
|
|||
return $output;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
=head2 C<< pandora_block_ping (I<$pa_config>, I<$hosts>) >>
|
||||
|
||||
Ping all given hosts. Returns an array with all hosts detected as alive.
|
||||
|
||||
=cut
|
||||
########################################################################
|
||||
sub pandora_block_ping($@) {
|
||||
my ($pa_config, @hosts) = @_;
|
||||
|
||||
# fping timeout in milliseconds
|
||||
my $cmd = $pa_config->{'fping'} . " -a -q -t " . (1000 * $pa_config->{'networktimeout'}) . " " . (join (' ', @hosts));
|
||||
|
||||
my @output = `$cmd 2>$DEVNULL`;
|
||||
|
||||
return @output;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
=head2 C<< month_have_days (I<$month>, I<$year>) >>
|
||||
|
||||
|
|
Loading…
Reference in New Issue