Merge pull request #987 from f0o/icmp-servicecheck

Added ICMP service-check
This commit is contained in:
Neil Lathwood
2015-05-13 14:25:31 +01:00

View File

@@ -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';
}
?>