Module: check_mk
Branch: master
Commit: 93e4b659502779c597657cf35666c25f43334e26
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=93e4b659502779…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Sep 16 15:21:42 2016 +0200
3746 FIX tinkerforge: Keep check from crashing in case of unconfigured params
---
.werks/3746 | 9 +++++++++
ChangeLog | 1 +
checks/tinkerforge | 5 +++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/3746 b/.werks/3746
new file mode 100644
index 0000000..154629b
--- /dev/null
+++ b/.werks/3746
@@ -0,0 +1,9 @@
+Title: tinkerforge: Keep check from crashing in case of unconfigured params
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1474032061
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index a36def0..b784290 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -393,6 +393,7 @@
* 3837 FIX: Fixed empty check if lnx_if info contains additional line...
* 3802 FIX: Fixed excess Check Helper PIPEs when a datasource program runs into a
timeout...
* 3701 FIX: FIX ps.perf graph title for Memory and CPU Usage...
+ * 3746 FIX: tinkerforge: Keep check from crashing in case of unconfigured params
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/checks/tinkerforge b/checks/tinkerforge
index 18fcbcf..5335f67 100644
--- a/checks/tinkerforge
+++ b/checks/tinkerforge
@@ -85,10 +85,11 @@ def parse_tinkerforge(info):
def inventory_tinkerforge(brick_type, parsed):
for path in parsed.get(brick_type, {}).keys():
if brick_type == "humidity":
- # stupid wato rule with its stupid tuple-based parameters is stupid
yield path, "tinkerforge_humidity_default_levels"
- else:
+ elif brick_type == "ambient":
yield path, None
+ else:
+ yield path, {}
def check_tinkerforge_master(item, params, parsed):