Module: check_mk
Branch: master
Commit: 285420523479f04a6fd76bea43d5d75838cfb227
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=285420523479f0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Mar 4 17:37:10 2015 +0100
#2045 FIX Avoid fetching SNMP data when showing service list in WATO - unless Full Scan is
pressed
---
.werks/2045 | 10 ++++++++++
ChangeLog | 1 +
modules/automation.py | 9 ++++++++-
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/2045 b/.werks/2045
new file mode 100644
index 0000000..e26127e
--- /dev/null
+++ b/.werks/2045
@@ -0,0 +1,10 @@
+Title: Avoid fetching SNMP data when showing service list in WATO - unless Full Scan is
pressed
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1425487004
+
+
diff --git a/ChangeLog b/ChangeLog
index d599157..f8f80d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -320,6 +320,7 @@
* 2078 FIX: Fixed exception with some snapshots when using a localized GUI...
* 2080 FIX: Fixed UnicodeDecodeError when using a localized GUI on notification
configuration page
* 2084 FIX: Disabled notification for a user is now shown on profile page even when
not permitted to edit...
+ * 2045 FIX: Avoid fetching SNMP data when showing service list in WATO - unless Full
Scan is pressed
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host
notications
diff --git a/modules/automation.py b/modules/automation.py
index 6d20c45..f2044c7 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -193,7 +193,7 @@ def automation_discovery(args):
return counts, failed_hosts
-def automation_try_discovery(args): #### , leave_no_tcp=False, with_snmp_scan=False):
+def automation_try_discovery(args):
use_caches = False
do_snmp_scan = False
if args[0] == '@noscan':
@@ -205,6 +205,13 @@ def automation_try_discovery(args): #### , leave_no_tcp=False,
with_snmp_scan=Fa
do_snmp_scan = True
use_caches = False
+ # TODO: Remove this unlucky option opt_use_cachefile. At least do not
+ # handle this option so deep in the code. It should only be handled
+ # by top-level functions.
+ global opt_use_cachefile, check_max_cachefile_age
+ opt_use_cachefile = use_caches
+ if use_caches:
+ check_max_cachefile_age = inventory_max_cachefile_age
hostname = args[0]
table = get_check_preview(hostname, use_caches=use_caches,
do_snmp_scan=do_snmp_scan)
return table