Module: check_mk
Branch: master
Commit: 5ac733bd0338b38d23a43b6aec6669eced6b453f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ac733bd0338b3…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 11 13:19:34 2015 +0200
Now also using Inline-SNMP for cmk --snmpwalk
---
modules/check_mk.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 57e500d..fcc24fd 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4212,10 +4212,15 @@ def do_snmpwalk_on(hostname, filename):
try:
verbose("Walk on \"%s\"..." % oid)
- results = snmpwalk_on_suboid(hostname, ip, oid, hex_plain = True)
- for oid, value in results:
+ if has_inline_snmp and use_inline_snmp:
+ rows = inline_snmpwalk_on_suboid(hostname, None, oid)
+ rows = inline_convert_rows_for_stored_walk(rows)
+ else:
+ rows = snmpwalk_on_suboid(hostname, ip, oid, hex_plain = True)
+
+ for oid, value in rows:
out.write("%s %s\n" % (oid, value))
- verbose("%d variables.\n" % len(results))
+ verbose("%d variables.\n" % len(rows))
except:
if opt_debug:
raise