Module: check_mk
Branch: master
Commit: 474ecbc0df7594b843ffadde11e591d6857a924f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=474ecbc0df7594…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 6 15:04:22 2016 +0100
4133 FIX Do not suppress site specific global issues during WATO activation
---
.werks/4133 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 20 +++++++++-----------
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/.werks/4133 b/.werks/4133
new file mode 100644
index 0000000..e08b8c2
--- /dev/null
+++ b/.werks/4133
@@ -0,0 +1,9 @@
+Title: Do not suppress site specific global issues during WATO activation
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i3
+Date: 1481033046
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index ecab0b5..8f74116 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -86,6 +86,7 @@
* 4084 FIX: Improved error handling in case of broken hosts.mk files
* 4130 FIX: Improved error handling when trying to edit not existant rules
* 4131 FIX: Fixed broken WATO site login when using password containing special characters...
+ * 4133 FIX: Do not suppress site specific global issues during WATO activation
Notifications:
* 4042 FIX: Fix missing From address in synchronous SMTP notifications...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index bb514b4..cf73164 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -3658,11 +3658,6 @@ def automation_push_snapshot():
multitar.extract_from_buffer(tarcontent, replication_paths)
- # We expect one file containing sitespecific global settings.
- # That is contained in the sub-tarball "sitespecific.tar" and
- # just contains one file: "sitespecific.mk". The contains a repr()
- # of all global settings, that should override the ones in global.mk
- # in various directories.
try:
tmp_dir = cmk.paths.tmp_dir + "/sitespecific-%s" % id(html)
if not os.path.exists(tmp_dir):
@@ -3676,15 +3671,18 @@ def automation_push_snapshot():
save_configuration_settings(current_settings)
shutil.rmtree(tmp_dir)
- except Exception, e:
- logger(LOG_WARNING, "Warning: cannot extract site-specific global settings: %s" % e)
- confirm_all_local_changes() # pending changes are lost
+ confirm_all_local_changes() # pending changes are lost
+
+ call_hook_snapshot_pushed()
- call_hook_snapshot_pushed()
+ # Create rule making this site only monitor our hosts
+ create_distributed_wato_file(site_id)
+ except Exception, e:
+ raise MKGeneralException(_("Failed to deploy configuration: \"%s\". "
+ "Please note that the site configuration has been synchronized "
+ "partially.") % traceback.format_exc())
- # Create rule making this site only monitor our hosts
- create_distributed_wato_file(site_id)
log_audit(None, "replication", _("Synchronized with master (my site id is %s.)") % site_id)
return True
Module: check_mk
Branch: master
Commit: b02285f3f3ec001be5998d2218cab993fbe04065
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b02285f3f3ec00…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 6 14:29:24 2016 +0100
4132 Monitoring notifications: Add EC_ORIG_HOST to notifiation context
All notifications produced by the Event Console now add the variable EC_ORIG_HOST
to the notification context. The variable contains the original host information
of the event. Even when host rewriting is done, this contains the original name.
---
.werks/4132 | 11 +++++++++++
ChangeLog | 1 +
bin/mkeventd | 3 +++
3 files changed, 15 insertions(+)
diff --git a/.werks/4132 b/.werks/4132
new file mode 100644
index 0000000..1b3ee10
--- /dev/null
+++ b/.werks/4132
@@ -0,0 +1,11 @@
+Title: Monitoring notifications: Add EC_ORIG_HOST to notifiation context
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.4.0i3
+Date: 1481030875
+Class: feature
+
+All notifications produced by the Event Console now add the variable EC_ORIG_HOST
+to the notification context. The variable contains the original host information
+of the event. Even when host rewriting is done, this contains the original name.
diff --git a/ChangeLog b/ChangeLog
index e5c27fb..ecab0b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -94,6 +94,7 @@
* 3991 FIX: BI Aggregations: no longer show duplicate aggregations when an aggregation has mulitple groups
Event Console:
+ * 4132 Monitoring notifications: Add EC_ORIG_HOST to notifiation context...
* 4097 FIX: Event console: Make writing of status file more robust...
Livestatus:
diff --git a/bin/mkeventd b/bin/mkeventd
index 7203a1e..1cf41cf 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -2371,6 +2371,7 @@ class EventServer:
if "set_text" in rule:
event["text"] = replace_groups(rule["set_text"], event["text"], groups)
if "set_host" in rule:
+ event["orig_host"] = event["host"]
event["host"] = replace_groups(rule["set_host"], event["host"], groups)
if "set_application" in rule:
event["application"] = replace_groups(rule["set_application"], event["application"], groups)
@@ -3938,6 +3939,8 @@ def do_notify(event, username=None, is_cancelling=False):
"EC_PID": str(event.get("pid", 0)),
"EC_MATCH_GROUPS": "\t".join(event["match_groups"]),
"EC_CONTACT_GROUPS": contact_groups and " ".join(contact_groups) or "",
+ "EC_ORIG_HOST": event.get("orig_host", event["host"]),
+
}
# Add rule based notification specific macros and add the