Module: check_mk
Branch: master
Commit: a50c0ce69144aa5cf4fbbc70bc8d863eea437db2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a50c0ce69144aa…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 23 13:43:26 2011 +0100
Inventory of SNMP devices: force implicit full scan
---
ChangeLog | 2 ++
web/htdocs/wato.py | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9539d76..46aa366 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@
* NagVis auhtorization file generation is also executed on activate_changes
* Implemented a new inclusion based API for using multisite permissions
in other addons
+ * Inventory of SNMP devices: force implicit full scan if no services
+ are configured yet
* FIX: Calling activate_changes hook also in distributed WATO setups
* FIX: Fixed javascript errors when doing replication in distributed
wato environments when not having the sidebar open
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a39e220..db7efc3 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -1833,8 +1833,14 @@ def show_service_table(host, firsttime):
# Read current check configuration
cache_options = not html.var("_scan") and [ '--cache' ] or []
+
+ # We first try using the Cache (if the user has not pressed Full Scan).
+ # If we do not find any data, we omit the cache and immediately try
+ # again without using the cache.
try:
table = check_mk_automation(host[".siteid"], "try-inventory",
cache_options + [hostname])
+ if len(table) == 0 and cache_options != []:
+ table = check_mk_automation(host[".siteid"],
"try-inventory", [hostname])
except Exception, e:
if config.debug:
raise