mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
multi_tcp_ping: enable service_check by default
By default, Net::Ping will report a good attempt even when the remote end returns "connection refused". By enabling service_check, the connection must have been established. See https://perldoc.perl.org/Net/Ping.html#Functions
This commit is contained in:
parent
1357b8189e
commit
1fc177ce9a
1 changed files with 1 additions and 0 deletions
|
@ -105,6 +105,7 @@ sub ping_host {
|
|||
|
||||
$p=Net::Ping->new("tcp", $defaults{timeout});
|
||||
$p->hires();
|
||||
$p->service_check(1);
|
||||
$p->{port_num} = $host->[1] || $defaults{port};
|
||||
|
||||
($ret, $time, $ip) = $p->ping($host->[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue