Module: check_mk
Branch: master
Commit: dcf4b35bc8a5d14d0bbb3f81c208a1be5f2982d3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dcf4b35bc8a5d1…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri May 18 14:03:57 2018 +0200
6088 FIX steelhead_connections: Skip values of connection types which are not reported
Change-Id: Ied42e930ef5ac69ee42e52287b577aea11287d4e
---
.werks/6088 | 10 ++++++++++
checks/steelhead_connections | 7 +++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/6088 b/.werks/6088
new file mode 100644
index 0000000..e6fa744
--- /dev/null
+++ b/.werks/6088
@@ -0,0 +1,10 @@
+Title: steelhead_connections: Skip values of connection types which are not reported
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1526644982
+Class: fix
+
+
diff --git a/checks/steelhead_connections b/checks/steelhead_connections
index 89cf3c5..eea60bc 100644
--- a/checks/steelhead_connections
+++ b/checks/steelhead_connections
@@ -57,8 +57,11 @@ def check_steelhead_connections(item, params, info):
("established", "Established", True),
("halfOpened", "Half opened", True),
("halfClosed", "Half closed", True),
- ]:
- value = values[key]
+ ]:
+ value = values.get(key)
+ if value is None:
+ continue
+
if has_perf:
perfdata = [(key, value)]
else: