mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added ICMP service-check
This commit is contained in:
12
includes/services/icmp/check.inc
Normal file
12
includes/services/icmp/check.inc
Normal 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';
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user