Module: check_mk
Branch: master
Commit: 2a09d25fe622b00d228b3ff05602a92d8b2d3181
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a09d25fe622b0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 11 11:42:41 2013 +0100
FIX Fixed "Inventory failed" message when trying an inventory on clusters via
WATO
The service inventory of cluster hosts via WATO failed all the time with an error message
like "Inventory failed for this host: Error - host is unreachable, no usable cache
file present".
This error has been fixed with this change.
---
.werks/311 | 10 ++++++++++
ChangeLog | 1 +
modules/automation.py | 2 ++
web/htdocs/wato.py | 2 +-
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/311 b/.werks/311
new file mode 100644
index 0000000..904c324
--- /dev/null
+++ b/.werks/311
@@ -0,0 +1,10 @@
+Title: Fixed "Inventory failed" message when trying an inventory on clusters
via WATO
+Level: 2
+Component: wato
+Version: 1.2.3i8
+Date: 1386758273
+Class: fix
+
+The service inventory of cluster hosts via WATO failed all the time with an error
message
+like "Inventory failed for this host: Error - host is unreachable, no usable cache
file present".
+This error has been fixed with this change.
diff --git a/ChangeLog b/ChangeLog
index 3e38996..1c919f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
* 0242 FIX: Parameters for clustered services can now be configured on the cluster
host...
* 0309 FIX: Trying to prevent read/write conflicts with a large user base...
+ * 0311 FIX: Fixed "Inventory failed" message when trying an inventory on
clusters via WATO...
Reporting & Availability:
* 0018 New option for displaying a legend for the colors used in the timeline...
diff --git a/modules/automation.py b/modules/automation.py
index 6b4da4a..f0d1092 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -181,6 +181,7 @@ def automation_try_inventory(args, leave_no_tcp=False,
with_snmp_scan=False):
elif args[0] == '@scan':
args = args[1:]
with_snmp_scan = True
+ leave_no_tcp = True
hostname = args[0]
@@ -191,6 +192,7 @@ def automation_try_inventory(args, leave_no_tcp=False,
with_snmp_scan=False):
already_added = set([])
for node in nodes_of(hostname):
new_services = automation_try_inventory_node(node, leave_no_tcp=leave_no_tcp,
with_snmp_scan=with_snmp_scan)
+
for entry in new_services:
if host_of_clustered_service(node, entry[6]) == hostname:
# 1: check, 6: Service description
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index c08715d..a09cb1d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2491,7 +2491,7 @@ def show_service_table(host, firsttime):
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])
+ table = check_mk_automation(host[".siteid"],
"try-inventory", [ '@scan', hostname ])
html.set_var("_scan", "on")
except Exception, e:
if config.debug: