Module: check_mk
Branch: master
Commit: 895412861e5f5d8dd49b0614286b74211b8d4666
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=895412861e5f5d…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Sep 18 14:51:25 2017 +0200
5016 FIX hp_proliant_temp: Fixed crash if thresholds are set manually
The device delivers optionally thresholds for it's parts. If not, -99 will
be that value. A service with that device threshold crashed if a user would
set up thresholds for it's own. This is now fixed.
Change-Id: I97b3a3a8d068453b86c66cf3a29814cb94e22cba
---
.werks/5016 | 12 ++++++++++++
checks/hp_proliant_temp | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5016 b/.werks/5016
new file mode 100644
index 0000000..6c0eadc
--- /dev/null
+++ b/.werks/5016
@@ -0,0 +1,12 @@
+Title: hp_proliant_temp: Fixed crash if thresholds are set manually
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1505738884
+Class: fix
+
+The device delivers optionally thresholds for it's parts. If not, -99 will
+be that value. A service with that device threshold crashed if a user would
+set up thresholds for it's own. This is now fixed.
diff --git a/checks/hp_proliant_temp b/checks/hp_proliant_temp
index 557094e..627fbd2 100644
--- a/checks/hp_proliant_temp
+++ b/checks/hp_proliant_temp
@@ -41,7 +41,7 @@ def check_hp_proliant_temp(item, params, info):
# This case means no threshold available and
# the devices' web interface displays "N/A"
if threshold == "-99" or threshold == "0":
- devlevels = (None, None)
+ devlevels = None
else:
threshold = float(threshold)
devlevels = (threshold, threshold)