mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Merge pull request #987 from f0o/icmp-servicecheck
Added ICMP service-check
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$check = shell_exec($config['nagios_plugins'] . "/check_icmp ".($service['service_ip'] ? $service['service_ip'] : $service['hostname']));
|
||||
|
||||
list($check, $time) = split("\|", $check);
|
||||
|
||||
if(strstr($check, "OK - ")) {
|
||||
$status = '1';
|
||||
} else {
|
||||
$status = '0';
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user