Change fping hardcoded binary to user defined fping (#13720)

This check should run using the binary which is configured by the user. Some users user a wrapper script to add/remove options or extend fping functionality.
This commit is contained in:
sGoico
2022-01-27 19:55:00 -03:00
committed by GitHub
parent a1c6b735b0
commit e04902b4d1

View File

@@ -83,8 +83,9 @@ class PingCheck implements ShouldQueue
$timeout = Config::get('fping_options.timeout', 500); // must be smaller than period
$retries = Config::get('fping_options.retries', 2); // how many retries on failure
$tos = Config::get('fping_options.tos', 0); // TOS marking
$fping = Config::get('fping', 'fping'); // use user defined binary
$this->command = ['fping', '-f', '-', '-e', '-t', $timeout, '-r', $retries, '-O', $tos];
$this->command = [$fping, '-f', '-', '-e', '-t', $timeout, '-r', $retries, '-O', $tos];
$this->wait = Config::get('rrd.step', 300) * 2;
}