Module: check_mk
Branch: master
Commit: 35dc41428f2dd5c04a347ee4dffb78b35064ab6c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35dc41428f2dd5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Aug 13 10:39:57 2011 +0200
ntp.time: make CRIT, if peers are present but not used
---
checkman/ntp.time | 4 ++++
checks/ntp | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/checkman/ntp.time b/checkman/ntp.time
index 72086a7..4de01e9 100644
--- a/checkman/ntp.time
+++ b/checkman/ntp.time
@@ -15,6 +15,10 @@ description:
is UNKNOWN if no system peer is present or the system peer is
unreachable.
+ The check is CRIT, when there are NTP peers reachable but non
+ of those is used by the NTP daemon. That is the case if the time
+ provided by those peers is too bad.
+
Note: If you want to check the health of the peers, you might
want to use {ntp}, which creates one individual check per NTP peer.
diff --git a/checks/ntp b/checks/ntp
index b108b44..6c988a5 100644
--- a/checks/ntp
+++ b/checks/ntp
@@ -144,7 +144,7 @@ def check_ntp_summary(item, params, info):
state, text, perfdata = check_ntp(line[1], params, [line])
text += " (synchronized on %s)" % line[1]
return (state, text, perfdata)
- return (3, "UNKNOWN - no system peer found")
+ return (2, "CRIT - found %d peers, but none is suitable" % len(info))
check_info['ntp'] = (check_ntp, "NTP Peer %s", 1,
inventory_ntp)
check_info['ntp.time'] = (check_ntp_summary, "NTP Time", 1,
inventory_ntp_summary)