mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
Add ntp service monitoring.
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$check = shell_exec($config['nagios_plugins'] . "/check_ntp -H ".$service['hostname']." ".$service['service_param']);
|
||||||
|
|
||||||
|
list($check, $time) = split("\|", $check);
|
||||||
|
|
||||||
|
if(strstr($check, "NTP OK")) {
|
||||||
|
$status = '1';
|
||||||
|
} else {
|
||||||
|
$status = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user