Module: check_mk
Branch: master
Commit: 8963fc2c29b2f2f5432539b9d0c8982c69145e64
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8963fc2c29b2f2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 5 09:38:22 2014 +0100
apc_inrow_temp: try to fix check, but without a walk this is difficult
---
checks/apc_inrow_temp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/checks/apc_inrow_temp b/checks/apc_inrow_temp
index a737b1e..ebab953 100644
--- a/checks/apc_inrow_temp
+++ b/checks/apc_inrow_temp
@@ -52,6 +52,8 @@
# airIRRCUnitStatusLeavingFluidTemperatureUS 1.3.6.1.4.1.318.1.1.13.3.2.2.2.25.0
# airIRRCUnitStatusLeavingFluidTemperatureMetric 1.3.6.1.4.1.318.1.1.13.3.2.2.2.26.0
+apc_inrow_temp_default_levels = ( 30, 35 )
+
def apc_inrow_temp_convert(info):
vars = [
"Rack Inlet",
@@ -64,23 +66,23 @@ def apc_inrow_temp_convert(info):
data = {}
for name in vars:
if len(info) > count and info[count] != "-1":
- value = saveint(info[count])
+ value = int(info[count][0])
data[name] = value / 10.0
count += 1
return data
-apc_inrow_temp_default_levels = ( 30, 35 )
+
def inventory_apc_inrow_temp(info):
info = apc_inrow_temp_convert(info)
return [ (x, "apc_inrow_temp_default_levels") for x in info.keys() ]
+
def check_apc_inrow_temp(item, params, info):
info = apc_inrow_temp_convert(info)
for sensor, value in info.items():
if sensor == item:
- return check_temperature(temp, params)
+ return check_temperature(value, params)
- return 3, "Sensor not found"
check_info["apc_inrow_temp"] = {
"check_function" : check_apc_inrow_temp,