Module: check_mk
Branch: master
Commit: 830be0bb922e635a8ef656e6cd7ea2440e7d87bd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=830be0bb922e63…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed May 9 09:59:36 2018 +0200
6069 FIX netextreme_fan: Fixed crash if no speed information is sent from device
Change-Id: I40bf48b130a0d0e732a3468485b65a028aec03f6
---
.werks/6069 | 10 ++++++++++
checks/netextreme_fan | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/6069 b/.werks/6069
new file mode 100644
index 0000000..1620235
--- /dev/null
+++ b/.werks/6069
@@ -0,0 +1,10 @@
+Title: netextreme_fan: Fixed crash if no speed information is sent from device
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1525852737
+Class: fix
+
+
diff --git a/checks/netextreme_fan b/checks/netextreme_fan
index e1c9a9a..74ea63f 100644
--- a/checks/netextreme_fan
+++ b/checks/netextreme_fan
@@ -45,7 +45,8 @@ def check_netextreme_fan(item, params, info):
if fan_nr == item:
state, state_readable = map_fan_status[fan_status]
yield state, "Operational status: %s" % state_readable
- yield check_fan(int(fan_speed_str), params)
+ if fan_speed_str:
+ yield check_fan(int(fan_speed_str), params)
check_info['netextreme_fan'] = {