Module: check_mk
Branch: master
Commit: de33cc974319fe180992fe33e83291a1ed2e2081
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de33cc974319fe…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 13 10:07:19 2015 +0200
raritan_pdu_outletcount, raritan_pdu_plugs: improve scan functions
make them more specific, avoid fetching special OIDs
---
checks/etherbox | 4 ++++
checks/raritan_pdu_outletcount | 4 ++--
checks/raritan_pdu_plugs | 5 ++---
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/checks/etherbox b/checks/etherbox
index 802f81f..fef4c54 100644
--- a/checks/etherbox
+++ b/checks/etherbox
@@ -67,6 +67,10 @@ def etherbox_get_sensor(item, item_type, info):
raise Exception("Sensor not found")
def etherbox_scan(oid):
+ # Older firmware version of Etherbox do not answer on
+ # .1.3.6.1.2.1. (sysDescr). Yurks. We need to fetch
+ # a vendor specific OID here and wait until all old devices
+ # have vanished.
return oid(".1.3.6.1.4.1.14848.2.1.1.1.0").startswith("Version")
etherbox_info = [
diff --git a/checks/raritan_pdu_outletcount b/checks/raritan_pdu_outletcount
index 86655f8..383e07c 100644
--- a/checks/raritan_pdu_outletcount
+++ b/checks/raritan_pdu_outletcount
@@ -53,6 +53,6 @@ check_info['raritan_pdu_outletcount'] = {
"group" : "plug_count",
"has_perfdata" : True,
"snmp_info" : (".1.3.6.1.4.1.13742.6.3.2.2.1.4",
["1"]), # outletCount
- "snmp_scan_function" : lambda oid: \
-
oid(".1.3.6.1.4.1.13742.6.3.2.1.1.3.1").startswith("PX2-2")
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.13742.") and \
+
oid(".1.3.6.1.4.1.13742.6.3.2.1.1.3.1").startswith("PX2-2")
}
diff --git a/checks/raritan_pdu_plugs b/checks/raritan_pdu_plugs
index eb19866..6b37d29 100644
--- a/checks/raritan_pdu_plugs
+++ b/checks/raritan_pdu_plugs
@@ -80,7 +80,6 @@ check_info['raritan_pdu_plugs'] = {
"3.5.3.1.3", # OutletName (eigene vergebene Bezeichnung für den
Ausgang)
"4.1.2.1.3", # Outlet state at present (sh.o. outlet_state_info im
check)
]),
- "snmp_scan_function" : lambda oid: \
-
oid(".1.3.6.1.4.1.13742.6.3.2.1.1.3.1").startswith("PX2-2")
-
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.13742.") and \
+
oid(".1.3.6.1.4.1.13742.6.3.2.1.1.3.1").startswith("PX2-2")
}