Module: check_mk
Branch: master
Commit: 61096ab4a9bfc6287bedecc71e7342b30762c630
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=61096ab4a9bfc6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu May 7 16:10:23 2015 +0200
if64_tplink: Fix discovery of ports
---
checks/if64_tplink | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/checks/if64_tplink b/checks/if64_tplink
index e958077..8e4c089 100644
--- a/checks/if64_tplink
+++ b/checks/if64_tplink
@@ -27,14 +27,17 @@
def parse_if64_tplink(info):
parsed = []
for line in info:
- parsed.append(line[:3] + [ int(line[3]) * 1000000 ] + line[4:])
+ parsed.append(line[:3] + [ str(int(line[3]) * 1000000) ] + line[4:])
return parsed
+def inventory_if64_tplink(parsed):
+ return inventory_if_common(parsed)
+
check_info["if64_tplink"] = {
'parse_function': parse_if64_tplink,
'check_function': check_if_common,
- 'inventory_function': inventory_if_common,
+ 'inventory_function': inventory_if64_tplink,
'service_description': 'Interface %s',
'has_perfdata': True,
'includes': [ 'if.include' ],
@@ -61,7 +64,7 @@ check_info["if64_tplink"] = {
"2.1.2.2.1.6", # ifPhysAddress 19
]),
'snmp_scan_function': \
- lambda oid: ".4.1.11863." in oid(".1.3.6.1.2.1.1.2.0") and
\
+ lambda oid: True or ".4.1.11863." in
oid(".1.3.6.1.2.1.1.2.0") and \
oid(".1.3.6.1.2.1.31.1.1.1.6.*") != None,
'group': 'if',
'default_levels_variable': 'if_default_levels',