Module: check_mk
Branch: master
Commit: dae5a9cef10f80296259933cab224b8bf7544e8a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dae5a9cef10f80…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 2 15:31:25 2015 +0100
#2857 FIX fritz.conn: Handling missing connection state infos as UNKNOWN
---
.werks/2857 | 10 ++++++++++
ChangeLog | 1 +
checks/fritz | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/2857 b/.werks/2857
new file mode 100644
index 0000000..3f9e68d
--- /dev/null
+++ b/.werks/2857
@@ -0,0 +1,10 @@
+Title: fritz.conn: Handling missing connection state infos as UNKNOWN
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1449066670
+
+
diff --git a/ChangeLog b/ChangeLog
index 89a335e..3b4d145 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -125,6 +125,7 @@
* 1308 FIX: check_mk_agent.linux: Not longer list prl_fs filesystems...
* 2856 FIX: winperf_phydisk: Not discovering on clusters where disk perfcounters are
missing...
* 2875 FIX: citrix_farm.ps1: Add missing end marker of piggy data - fixes problem in
subsequent plugins
+ * 2857 FIX: fritz.conn: Handling missing connection state infos as UNKNOWN
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/fritz b/checks/fritz
index 52bd107..0989f94 100644
--- a/checks/fritz
+++ b/checks/fritz
@@ -51,7 +51,11 @@ fritz_conn_states = {
def check_fritz_conn(_unused, _no_params, info):
if not info:
return 3, 'Connection info is missing'
+
data = fritz_parse_info(info)
+ if "NewConnectionStatus" not in data:
+ return 3, 'Connection info is missing'
+
state_txt = data['NewConnectionStatus']
nag_state = fritz_conn_states.get(state_txt)
if nag_state is None: