Module: check_mk
Branch: master
Commit: 1a529099a29e9fdcd0b0989a647e8e634d900b1f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a529099a29e9f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Oct 15 00:58:34 2013 +0200
Fixed verbose output during SNMP inventory
---
modules/check_mk.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 8211c1c..3d7d7b0 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -826,10 +826,11 @@ def snmp_scan(hostname, ipaddress):
if opt_verbose:
sys.stdout.write("Scanning host %s(%s) for SNMP checks..." % (hostname,
ipaddress))
+ sys.stdout.flush()
if not in_binary_hostlist(hostname, snmp_without_sys_descr):
sys_descr = get_single_oid(hostname, ipaddress, ".1.3.6.1.2.1.1.1.0")
if sys_descr == None:
- if opt_debug:
+ if opt_verbose:
sys.stderr.write("no SNMP answer\n")
return []
@@ -4666,7 +4667,7 @@ def do_cleanup_autochecks():
hostchecks.append(line)
checks += 1
hostdata[hostname] = hostchecks
- if opt_verbose:
+ if opt_debug:
sys.stdout.write("Found %d checks from %d hosts.\n" % (checks,
len(hostdata)))
# 2. Write out new autochecks.