Module: check_mk
Branch: master
Commit: c27382bad633b09be2ba4a741e207b7a23b3f4d9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c27382bad633b0…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Oct 8 15:33:06 2015 +0200
fixed value error in check etherbox2_temp
---
checks/etherbox2_temp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/checks/etherbox2_temp b/checks/etherbox2_temp
index d1f1fbc..e8f4eff 100644
--- a/checks/etherbox2_temp
+++ b/checks/etherbox2_temp
@@ -40,12 +40,12 @@
# suggested by customer
-factory_settings['etherbox_temp_default_levels'] = {
+factory_settings['etherbox2_temp_default_levels'] = {
'levels' : (30, 35),
}
-def parse_etherbox_temp(info):
+def parse_etherbox2_temp(info):
# We have to use xxx.7.1.2.a to know if a temperature sensor
# is connected:
# - if oid(xxx.7.1.2.{a}) == 5.fff and oid(xxx.7.1.2.{a+1}) == 2.fff
@@ -58,26 +58,26 @@ def parse_etherbox_temp(info):
sensor_indicators, sensors = info
for sensor_index in range(0, len(sensors)):
indicator_index = 2 * sensor_index
- if float(sensor_indicators[indicator_index][0].split(" ")[0]) > 4
and \
- float(sensor_indicators[indicator_index + 1][0].split(" ")[0]) >
1:
+ if
float((sensor_indicators[indicator_index][0].split("Volt")[0]).strip()) > 4
and \
+ float((sensor_indicators[indicator_index +
1][0].split("Volt")[0]).strip()) > 1:
parsed["Sensor %s" % sensors[sensor_index][0]] =
float(sensors[sensor_index][1]) / 10
return parsed
-def inventory_etherbox_temp(parsed):
+def inventory_etherbox2_temp(parsed):
return [ (sensor, {}) for sensor in parsed ]
-def check_etherbox_temp(item, params, parsed):
+def check_etherbox2_temp(item, params, parsed):
if item in parsed:
return check_temperature(parsed[item], params)
check_info['etherbox2_temp'] = {
- 'parse_function' : parse_etherbox_temp,
- 'inventory_function' : inventory_etherbox_temp,
- 'check_function' : check_etherbox_temp,
+ 'parse_function' : parse_etherbox2_temp,
+ 'inventory_function' : inventory_etherbox2_temp,
+ 'check_function' : check_etherbox2_temp,
'service_description' : 'Temperature %s',
'has_perfdata' : True,
'snmp_info' : [(".1.3.6.1.4.1.14848.2.1.7.1.2", [
"" ]),
@@ -88,7 +88,7 @@ check_info['etherbox2_temp'] = {
# disk space reasons.
'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.1.1.0")
== "" and \
"Version 1.2" in
oid(".1.3.6.1.4.1.14848.2.1.1.1.0", ""),
- 'default_levels_variable' : 'etherbox_temp_default_levels',
+ 'default_levels_variable' : 'etherbox2_temp_default_levels',
'group' : 'temperature',
'includes' : [ "temperature.include" ],
}