Module: check_mk
Branch: master
Commit: b6657ddc31c27bf2f61906cdb689e86adb4277a9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b6657ddc31c27b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 25 16:27:41 2015 +0100
akcp_sensor_drycontact: now really use new implementation
---
checks/akcp_exp_drycontact | 2 +-
checks/akcp_sensor_drycontact | 16 +++-------------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/checks/akcp_exp_drycontact b/checks/akcp_exp_drycontact
index bf3a944..5aca840 100644
--- a/checks/akcp_exp_drycontact
+++ b/checks/akcp_exp_drycontact
@@ -31,7 +31,7 @@
check_info["akcp_exp_drycontact"] = {
"check_function" : check_akcp_sensor_drycontact,
- "inventory_function" : lambda info: inventory_akcp_sensor(info),
+ "inventory_function" : inventory_akcp_sensor,
"service_description" : "Dry Contact %s",
"snmp_scan_function" : snmp_scan_akcp_exp,
"snmp_info" : ( ".1.3.6.1.4.1.3854.2.3.4.1", [
diff --git a/checks/akcp_sensor_drycontact b/checks/akcp_sensor_drycontact
index 174ed56..fb9a94a 100644
--- a/checks/akcp_sensor_drycontact
+++ b/checks/akcp_sensor_drycontact
@@ -29,25 +29,15 @@ def inventory_akcp_sensor_drycontact(info):
return [ ( x[0], None ) for x in info if x[2] == "1" ]
-def check_akcp_sensor_drycontact(item, _no_params, info):
- for line in info:
- if item == line[0]:
- state = saveint(line[1])
- if state == 2:
- return 0, "Drycontact OK"
- return 2, "Drycontact on Error"
- return 3, "Drycontact not found anymore"
-
-
check_info["akcp_sensor_drycontact"] = {
"check_function" : check_akcp_sensor_drycontact,
"inventory_function" : inventory_akcp_sensor_drycontact,
"service_description" : "Dry Contact %s",
"snmp_scan_function" : snmp_scan_akcp_sensor,
"snmp_info" : ( ".1.3.6.1.4.1.3854.1.2.2.1.18.1" , [
- 1, #Sensor Name
- 3, #Sensor Status (2 = OK, 4 = Not ok)
- 5, #Sensor Online
+ 1, # Sensor Name
+ 3, # Sensor Status (2 = OK, 4 = Not ok)
+ 5, # Sensor Online
] ),
"includes" : [ "akcp_sensor.include" ],
}