Module: check_mk
Branch: master
Commit: e478759d213641fed2e5297dd9ca42399fad9052
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e478759d213641…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 11 09:16:59 2014 +0100
cisco_temp_sensor: Fixed temperature value scaling
---
checks/cisco_temp_sensor | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/cisco_temp_sensor b/checks/cisco_temp_sensor
index 8a61ccc..9e45d4e 100644
--- a/checks/cisco_temp_sensor
+++ b/checks/cisco_temp_sensor
@@ -120,7 +120,7 @@ def parse_cisco_temp_sensor(info):
thresholds.setdefault(id, [])
for endoid, level in levels_info:
- level = int(level)*(10**int(precision))
+ level = float(level)/(10**int(precision))
# endoid is e.g. 21549.9 or 21459.10
id, subid = endoid.split('.')
thresholds.setdefault(id, []).append(level)
@@ -128,7 +128,7 @@ def parse_cisco_temp_sensor(info):
# Create main dictionary (only of temperature sensors)
sensors = []
for id, sensortype, precision, value, sensorstate in state_info:
- value = int(value)*(10**int(precision))
+ value = float(value)/(10**int(precision))
sensors.append( ( id, descriptions.get(id), sensortype,
value, sensorstate, thresholds[id] ) )
return sensors