Module: check_mk
Branch: master
Commit: b921974010e2e47881151a140a9a605a2f8a1a77
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b921974010e2e4…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 24 16:40:08 2012 +0100
FIX: ntp checks: output numeric data also if stratum too high
---
ChangeLog | 1 +
checks/ntp | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0124209..e36a50f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@
* Linux agent: wrap freeipmi with lock in order to avoid cache corruption
* New check: megaraid_bbu - check existance & status of LSI MegaRaid BBU module
* HP-UX Agent: fix mrpe (remove echo -e and test -e, thanks to Philipp Lemke)
+ * FIX: ntp checks: output numeric data also if stratum too high
Multisite:
* Improve transaction handling and reload detection: user can have
diff --git a/checks/ntp b/checks/ntp
index e8a6594..0e988f5 100644
--- a/checks/ntp
+++ b/checks/ntp
@@ -109,7 +109,7 @@ def check_ntp_server_state(line, params):
elif state in [ "falsetick" ]:
return (2, infotext, offset, jitter)
elif stratum >= maxstratum:
- return (2, "stratum %d is too high (max allowed is %d)" % (stratum,
maxstratum - 1))
+ 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)