Fixed the shown Temperature Values
Message-ID: <55b8dc1a.e4PNq/UZYcoSawtr%bk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: b06c77b07ebb21c079e2a47c9a8ddff0d8492bcd
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b06c77b07ebb21…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 29 15:58:22 2015 +0200
#1276 FIX brocade_mlx_temperature: Fixed the shown Temperature Values
---
.werks/1276 | 10 ++++++++++
ChangeLog | 1 +
checks/brocade_mlx_temp | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/1276 b/.werks/1276
new file mode 100644
index 0000000..e429452
--- /dev/null
+++ b/.werks/1276
@@ -0,0 +1,10 @@
+Title: brocade_mlx_temperature: Fixed the shown Temperature Values
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1438178266
+
+
diff --git a/ChangeLog b/ChangeLog
index 9d0059c..260912e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -89,6 +89,7 @@
NOTE: Please refer to the migration notes!
* 1275 FIX: Fileinfo: Fixed handling of output from AIX Agent
* 2500 FIX: qlogic_fcport: Can now deal with missing port status information...
+ * 1276 FIX: brocade_mlx_temperature: Fixed the shown Temperature Values
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/brocade_mlx_temp b/checks/brocade_mlx_temp
index 32d6fb8..3636e32 100644
--- a/checks/brocade_mlx_temp
+++ b/checks/brocade_mlx_temp
@@ -31,13 +31,13 @@ factory_settings["brocade_mlx_temperature_default_levels"] =
{
def parse_brocade_mlx_temp(info):
parsed = {}
for temp_descr, temp_value in info:
- if temp_value:
+ if temp_value and temp_value != '0':
item = temp_descr.replace("temperature", "")\
.replace("module", "Module")\
.replace("sensor", "Sensor")\
.replace(",", "")\
.strip()
- parsed[item] = int(temp_value)
+ parsed[item] = float(temp_value) * 0.5
return parsed