mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Honour IP Field for DNS Checks
This commit is contained in:
@@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
// provide some sane default
|
// provide some sane default
|
||||||
if ($service['service_param']) { $nsquery = $service['service_param']; } else { $nsquery = "localhost"; }
|
if ($service['service_param']) { $nsquery = $service['service_param']; } else { $nsquery = "localhost"; }
|
||||||
|
if ($service['service_ip']) { $resolver = $service['service_ip']; } else { $resolver = $service['hostname']; }
|
||||||
|
|
||||||
$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$nsquery." -s ".$service['hostname']);
|
$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$nsquery." -s ".$resolver);
|
||||||
|
|
||||||
list($check, $time) = split("\|", $check);
|
list($check, $time) = split("\|", $check);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user