Module: check_mk
Branch: master
Commit: 55983383678549341bb0e5cb7f5cfd8befc8ad30
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=55983383678549…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Tue Nov 22 14:32:46 2016 +0100
4088 FIX ntp: fixed incomplete data handling
---
.werks/4088 | 10 ++++++++++
ChangeLog | 1 +
checks/ntp | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/4088 b/.werks/4088
new file mode 100644
index 0000000..d86bfc7
--- /dev/null
+++ b/.werks/4088
@@ -0,0 +1,10 @@
+Title: ntp: fixed incomplete data handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i3
+Date: 1479821543
+
+
diff --git a/ChangeLog b/ChangeLog
index 9aca2e0..4422ab5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
* 3941 FIX: zypper: fixed broken check for sections since agent OS SLES12...
* 4043 FIX: Add missing metric definition for 15 minute CPU load prediction'
* 3751 FIX: jolokia_metrics: Discovery no longer crashes in case of error querying
instance
+ * 4088 FIX: ntp: fixed incomplete data handling
Multisite:
* 3974 FIX: Sorting comments in hover menu of comments icon by time now
diff --git a/checks/ntp b/checks/ntp
index 3b90f06..bd0b13d 100644
--- a/checks/ntp
+++ b/checks/ntp
@@ -131,7 +131,7 @@ def check_ntp_server_state(line, params):
def check_ntp(item, params, info):
for line in info:
- if line[1] == item:
+ if line[1] == item and len(line) == 11:
state = check_ntp_server_state(line, params)
if len(state) == 4:
state, text, offset, jitter = state
@@ -143,7 +143,7 @@ def check_ntp(item, params, info):
perfdata = []
return (state, text, perfdata)
- return (3, "peer not found")
+ return 3, "peer not found", []
def check_ntp_summary(_no_item, params, info):