Module: check_mk
Branch: master
Commit: a709ed59d006fbcb84e62051ae47080a1bd441be
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a709ed59d006fb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 6 13:32:32 2013 +0100
Added hook mkeventd-activate-changes to add custom actions to the mkeventd "activate
changes" GUI function
---
ChangeLog | 2 ++
mkeventd/web/plugins/wato/mkeventd.py | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a9548df..b0f9ecc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,8 @@
* Init-Script: Detecting and reporting already running processes
* WATO: Added hook to make the mkeventd reload in distributed WATO setups
during "activate changes" process
+ * Added hook mkeventd-activate-changes to add custom actions to the mkeventd
+ "activate changes" GUI function
1.2.1i5:
Core:
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index 8c13832..6f59953 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1086,6 +1086,13 @@ def mkeventd_reload():
pass # ignore not existing logfile
log_audit(None, "mkeventd-activate", _("Activated changes of event
console configuration"))
+# This hook is executed when one applies the pending configuration changes
+# related to the mkeventd via WATO on the local system. The hook is called
+# without parameters.
+def call_hook_mkeventd_activate_changes():
+ if hooks.registered('mkeventd-activate-changes'):
+ hooks.call("mkeventd-activate-changes")
+
def mode_mkeventd_changes(phase):
if phase == "title":
return _("Event Console - Pending Changes")
@@ -1100,6 +1107,7 @@ def mode_mkeventd_changes(phase):
elif phase == "action":
if html.check_transaction():
mkeventd_reload()
+ call_hook_mkeventd_activate_changes()
return "mkeventd_rules", _("Changes successfully
activated.")
else: