Module: check_mk
Branch: master
Commit: 8e1944b27ed0c0b40214067956a2386dce749aed
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e1944b27ed0c0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 20 15:36:57 2016 +0100
#2907 FIX chrony: Fixed exception in discovery function when daemon is not running
---
.werks/2907 | 9 +++++++++
ChangeLog | 1 +
checks/chrony | 8 ++++++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2907 b/.werks/2907
new file mode 100644
index 0000000..dd75369
--- /dev/null
+++ b/.werks/2907
@@ -0,0 +1,9 @@
+Title: chrony: Fixed exception in discovery function when daemon is not running
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1453300591
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 69f40a2..a2e7472 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -193,6 +193,7 @@
* 2917 FIX: cisco_asa_failover: Will no longer discover on devices where failover is
disabled...
* 2927 FIX: Fix links to logwatch logfiles in case of several special characters in
the name...
* 2891 FIX: mcafee_av_client: fixed wrong params handling after WATO configuration
+ * 2907 FIX: chrony: Fixed exception in discovery function when daemon is not running
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/chrony b/checks/chrony
index 595f35c..ac91edf 100644
--- a/checks/chrony
+++ b/checks/chrony
@@ -38,11 +38,15 @@ ntp_default_levels = (10, 200.0, 500.0) # stratum, ms offset
# Root delay : 0.027455 seconds
# Root dispersion : 0.024512 seconds
+# <<<chrony>>>
+# 506 Cannot talk to daemon
+
def parse_chrony(info):
parsed = {}
for line in info:
- varname, value = " ".join(line).split(":", 1)
- parsed[varname.strip()] = value.strip()
+ if ":" in line:
+ varname, value = " ".join(line).split(":", 1)
+ parsed[varname.strip()] = value.strip()
return parsed
# We monitor all servers we have reached at least once