Module: check_mk
Branch: master
Commit: 456f2efa8d17a7d0d3ee8c1b964dd0fd7ea7ec14
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=456f2efa8d17a7…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Tue Jan 3 11:11:22 2017 +0100
4183 FIX ibm_imm_fan: Fixed crash if fan speed is "unavailable"
If the value for speed is "unavailable" the behaviour is now similar to
"offline": The state becomes CRIT and the status detail shows the output
"is unvailable".
Change-Id: Ic5f1a7531a6c4b15feb76c0ab88c94f93c743d63
---
.werks/4183 | 11 +++++++++++
ChangeLog | 1 +
checks/ibm_imm_fan | 4 ++--
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/.werks/4183 b/.werks/4183
new file mode 100644
index 0000000..feb888e
--- /dev/null
+++ b/.werks/4183
@@ -0,0 +1,11 @@
+Title: ibm_imm_fan: Fixed crash if fan speed is "unavailable"
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i4
+Date: 1483438073
+Class: fix
+
+If the value for speed is "unavailable" the behaviour is now similar to
+"offline": The state becomes CRIT and the status detail shows the output
"is unvailable".
+
diff --git a/ChangeLog b/ChangeLog
index 5edbf5d..1794caa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* 4122 FIX: ibm_svc_enclosure: added support for firmware >= 7.8...
* 4182 FIX: mysql_slave: fixed crash if agent output is empty...
* 4176 FIX: postfix_mailq_status: fixed wrong status handling
+ * 4183 FIX: ibm_imm_fan: Fixed crash if fan speed is "unavailable"...
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can
now be configured via global settings....
diff --git a/checks/ibm_imm_fan b/checks/ibm_imm_fan
index 82f2a9a..a9bf705 100644
--- a/checks/ibm_imm_fan
+++ b/checks/ibm_imm_fan
@@ -40,8 +40,8 @@ def check_ibm_imm_fan(item, params, info):
for descr, speed_text in info:
if descr == item:
- if speed_text.lower() == "offline":
- yield 2, "is offline"
+ if speed_text.lower() in ["offline", "unavailable"]:
+ yield 2, "is %s" % speed_text.lower()
return
# speed_text can be "34 %", or "34%", or "34 % of
maximum"