Module: check_mk
Branch: master
Commit: 1eb2907771b4ce8ab37d0474ec2cb5fa7a9e4969
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1eb2907771b4ce…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Oct 18 15:27:45 2013 +0200
Hopefully cleanedup akcp_sensors_temp scan function. Please feedback in case of missing
inventory of the sensors
---
checks/akcp_sensor_temp | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/checks/akcp_sensor_temp b/checks/akcp_sensor_temp
index e4e40c6..0da73e0 100644
--- a/checks/akcp_sensor_temp
+++ b/checks/akcp_sensor_temp
@@ -34,11 +34,7 @@
akcp_sensor_temp_defaultlevels = (28, 32)
def inventory_akcp_sensor_temp(info):
- inventory = []
- for desc, degree, status, online, degreetype, degreeraw in info:
- if online == "1":
- inventory.append( (desc, "akcp_sensor_temp_defaultlevels") )
- return inventory
+ return [ (x[0], "akcp_sensor_temp_defaultlevels" ) for x in info if x[3] ==
"1" ]
def check_akcp_sensor_temp(item, params, info):
for desc, degree, status, online, degreetype, degreeraw in info:
@@ -90,7 +86,7 @@ check_info["akcp_sensor_temp"] = {
14, #sensorProbeTempDegreeRaw - SP Only: The raw degree data from the
temperature sensor, slightly hig
],
),
- 'snmp_scan_function': \
- lambda oid: "AKCP" in oid(".1.3.6.1.4.1.3854.1.1.6.0") and
"sensorProbe" in oid(".1.3.6.1.4.1.3854.1.1.8.0"),
- 'group': 'room_temperature',
+ 'snmp_scan_function': lambda oid: oid(".1.3.6.1.2.1.1.2.0") in\
+ [ ".1.3.6.1.4.1.3854.1.2.2.1.1",
".1.3.6.1.4.1.3854.1" ],
+ 'group' : 'room_temperature',
}