Module: check_mk
Branch: master
Commit: 9b7b5458abdea2bdd3257737b251ab58abcfccb3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9b7b5458abdea2…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Jul 17 13:13:54 2015 +0200
#2408 FIX ibm_imm_fan: fixed exception while parsing fan percentage values
---
.werks/2408 | 10 ++++++++++
ChangeLog | 1 +
checks/ibm_imm_fan | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/2408 b/.werks/2408
new file mode 100644
index 0000000..877320a
--- /dev/null
+++ b/.werks/2408
@@ -0,0 +1,10 @@
+Title: ibm_imm_fan: fixed exception while parsing fan percentage values
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437131588
+
+
diff --git a/ChangeLog b/ChangeLog
index 4f4bed8..37365b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,7 @@
* 2403 FIX: ibm_imm_fan: fixed exception with invalid formatted fan speed
information...
* 2404 FIX: apache_status: now able to handle BusyServers and IdleServers...
* 2406 FIX: fileinfo: fixed missing size performance data for very large (e.g 2TB)
files and fileinfo groups...
+ * 2408 FIX: ibm_imm_fan: fixed exception while parsing fan percentage values
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/ibm_imm_fan b/checks/ibm_imm_fan
index 0674034..6f8d4e4 100644
--- a/checks/ibm_imm_fan
+++ b/checks/ibm_imm_fan
@@ -40,7 +40,7 @@ def check_ibm_imm_fan(item, _no_params, info):
# speed can be "34 %", or "34%", or "34 % of
maximum"
# or simply a text without quotes..
- rpm_perc = int(speed.replace("[\"%]", "
").replace("%", " ").split(" ")[0])
+ rpm_perc = int(speed.strip().replace("[\"%]", "
").replace("%", " ").split(" ")[0])
infotext = "%d%% of max rpm" % rpm_perc
warn, crit = (28, 25) # preliminary estimates of levels