Module: check_mk
Branch: master
Commit: 0b3ab4c2d22633e5752885c39b3f6994108e3900
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0b3ab4c2d22633…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue May 10 14:46:20 2011 +0200
Execute SNMP scan in sorted order (cosmetic)
---
modules/check_mk.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 79ad2d2..493db25 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -685,7 +685,9 @@ def snmp_scan(hostname, ipaddress):
return []
found = []
- for checktype, detect_function in snmp_scan_functions.items():
+ items = snmp_scan_functions.items()
+ items.sort()
+ for checktype, detect_function in items:
if checktype in ignored_checktypes:
continue
try:
@@ -698,7 +700,9 @@ def snmp_scan(hostname, ipaddress):
pass
# Now try all checks not having a scan function
- for checktype in check_info.keys():
+ items = check_info.keys()
+ items.sort()
+ for checktype in items:
if checktype in ignored_checktypes:
continue
@@ -1652,6 +1656,7 @@ def do_snmp_scan(hostnamelist, check_only=False,
include_state=False):
return result
+
def make_inventory(checkname, hostnamelist, check_only=False, include_state=False):
try:
inventory_function = check_info[checkname][3]