Module: check_mk
Branch: master
Commit: b89804fd05f22ad0bbdf8d27abc7eadbe8c3e96f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b89804fd05f22a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Dec 11 16:16:31 2013 +0100
A WATO inventory on a cluster node no longer removes clustered services
---
modules/automation.py | 2 +-
web/htdocs/wato.py | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/automation.py b/modules/automation.py
index f0d1092..9502457 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -430,7 +430,7 @@ def automation_set_autochecks(args):
existing = automation_parse_autochecks_file(node)
for ct, item, params, paramstring in existing:
descr = service_description(ct, item)
- if node == host_of_clustered_service(node, descr):
+ if hostname != host_of_clustered_service(node, descr):
new_autochecks.append((ct, item, paramstring))
for (ct, item), paramstring in new_items.items():
new_autochecks.append((ct, item, paramstring))
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a09cb1d..851a414 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2463,6 +2463,8 @@ def mode_inventory(phase, firsttime):
varname = "_%s_%s" % (ct, html.varencode(item))
if html.var(varname, "") != "":
active_checks[(ct, item)] = paramstring
+ if st == "clustered":
+ active_checks[(ct, item)] = paramstring
check_mk_automation(host[".siteid"], "set-autochecks",
[hostname], active_checks)
if host.get("inventory_failed"):