Skip to content

Commit

Permalink
Merge pull request #1387 from spinza/addntpservice
Browse files Browse the repository at this point in the history
Add ntp service monitoring.
  • Loading branch information
laf committed Jul 5, 2015
2 parents f442cd6 + abe773c commit 7bc3ec2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/Extensions/Services.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ no graphs will be generated. **
- smtp
- pop
- simap
- ntp
13 changes: 13 additions & 0 deletions includes/services/ntp/check.inc
Original file line number Diff line number Diff line change
@@ -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';
}

?>

0 comments on commit 7bc3ec2

Please sign in to comment.