Module: check_mk
Branch: master
Commit: baa3383a42441ee7b03969887d45ff8a2af11172
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=baa3383a42441e…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Mar 13 14:09:27 2017 +0100
4352 FIX akcp_exp_temp, akcp_sensor_temp: No longer crash when temperature information is
missing.
Change-Id: I4f22655783cc41a9c9f786f639e432c1337c28b2
---
.werks/4352 | 11 +++++++++++
checks/akcp_sensor.include | 2 ++
2 files changed, 13 insertions(+)
diff --git a/.werks/4352 b/.werks/4352
new file mode 100644
index 0000000..c35aafd
--- /dev/null
+++ b/.werks/4352
@@ -0,0 +1,11 @@
+Title: akcp_exp_temp, akcp_sensor_temp: No longer crash when temperature information is
missing.
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1489410378
+
+
diff --git a/checks/akcp_sensor.include b/checks/akcp_sensor.include
index 586633d..7c5245d 100644
--- a/checks/akcp_sensor.include
+++ b/checks/akcp_sensor.include
@@ -164,6 +164,8 @@ def check_akcp_sensor_temp(item, params, info):
if degreeraw and degreeraw != "0":
temperature = float(degreeraw) / 10.0
+ elif not degree:
+ return 3, "Temperature information not found"
else:
temperature = float(degree)