Module: check_mk
Branch: master
Commit: fb4f07e1dbe5d6c2a47c39915084f2a054b33af0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb4f07e1dbe5d6…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Mar 13 15:58:26 2015 +0100
mbg_lantime checks: scan function now detects more devices
---
checks/mbg_lantime.include | 4 ++--
checks/mbg_lantime_ng_state | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/checks/mbg_lantime.include b/checks/mbg_lantime.include
index 934e8a8..d93e74e 100644
--- a/checks/mbg_lantime.include
+++ b/checks/mbg_lantime.include
@@ -31,8 +31,8 @@ factory_settings["mbg_lantime_state_default_levels"] = {
}
def snmp_scan_mbg_lantime_ng_hw(oid):
- return oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.5597.3" and \
- oid(".1.3.6.1.4.1.5597.30.0.5.*")
+ return oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.5597.3" or \
+ oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.5597.30"
def check_mbg_lantime_state_common(states, _no_item, params, info):
ntp_state, stratum, refclock_name, refclock_offset = info[0]
diff --git a/checks/mbg_lantime_ng_state b/checks/mbg_lantime_ng_state
index 7ec3dbd..84749f4 100644
--- a/checks/mbg_lantime_ng_state
+++ b/checks/mbg_lantime_ng_state
@@ -54,7 +54,6 @@ check_info["mbg_lantime_ng_state"] = {
3, # MBG-SNMP-LTNG-MIB::mbgLtNgNtpRefclockName
4, # MBG-SNMP-LTNG-MIB::mbgLtNgNtpRefclockOffset
]),
- 'snmp_scan_function' : lambda oid:
(oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.5597.3" and \
-
oid(".1.3.6.1.4.1.5597.30.0.2.*")),
+ 'snmp_scan_function' : snmp_scan_mbg_lantime_ng_hw,
'includes' : ["mbg_lantime.include"],
}