Added ICMP service-check

This commit is contained in:
f0o
2015-05-11 12:34:57 +00:00
parent cee2ee3f47
commit 274474f0c7

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