Module: check_mk
Branch: master
Commit: e142be7c65195335386f45fbe06722d5ef200b86
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e142be7c651953…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 22 18:14:29 2012 +0100
ntp: do not check 'when' anymore
---
ChangeLog | 2 ++
checks/ntp | 9 +++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 12b96e4..60b24ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,8 @@
in order to be consistent with the Linux load check
* dell_powerconnect_cpu: hopefully correctly handle incomplete
output from agent now.
+ * ntp: do not check 'when' anymore since it can produce false
+ alarms.
Multisite:
* Added several missing localization strings
diff --git a/checks/ntp b/checks/ntp
index 0e988f5..8474197 100644
--- a/checks/ntp
+++ b/checks/ntp
@@ -110,8 +110,13 @@ def check_ntp_server_state(line, params):
return (2, infotext, offset, jitter)
elif stratum >= maxstratum:
return (2, infotext + (", stratum is too high (max allowed is %d)" %
(maxstratum - 1)))
- elif when > 2*poll and when > 128: # when can exceed poll for small polling
values
- return (3, "response due since %d secs%s" % (when - poll, infotext),
offset, jitter)
+
+ # The following check in some cases produces false alarms. The poll interval can
+ # switch back to a low value while 'when' still being at a high value. While
+ # this happens only for a short time, it will make the check alarm. So we
+ # rather switch this condition off:
+ # elif when > 2*poll and when > 128: # when can exceed poll for small polling
values
+ # return (3, "response due since %d secs%s" % (when - poll, infotext),
offset, jitter)
elif abs(offset) >= warn:
return (1, "offset too high" + infotext, offset, jitter)