Module: check_mk
Branch: master
Commit: a73eb8d8f22f04934b5eb08515efe6026e5f2f69
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a73eb8d8f22f04…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jan 27 11:45:05 2014 +0100
FIX Fix replication with WATO if EC is enabled on master and disabled on slave
---
.werks/686 | 9 +++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 12 ++++++++++--
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.werks/686 b/.werks/686
new file mode 100644
index 0000000..bab9928
--- /dev/null
+++ b/.werks/686
@@ -0,0 +1,9 @@
+Title: Fix replication with WATO if EC is enabled on master and disabled on slave
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1390819484
+
+
diff --git a/ChangeLog b/ChangeLog
index 2f7556e..dc96dcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -232,6 +232,7 @@
* 0434 FIX: Fixed wrong count of failed hosts in bulk inventory mode...
* 0678 FIX: Move two last global settings of Event Console to proper places
* 0268 FIX: wato inventory: fixed missing services...
+ * 0686 FIX: Fix replication with WATO if EC is enabled on master and disabled on
slave
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index 5aae1a3..74ec05c 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -2014,8 +2014,16 @@ register_rule(
# | Stuff for sending monitoring notifications into the event console. |
# '----------------------------------------------------------------------'
def mkeventd_update_notifiation_configuration(hosts):
- contactgroup = config.mkeventd_notify_contactgroup
- remote_console = config.mkeventd_notify_remotehost
+ # Setup notification into the Event Console. Note: If
+ # the event console is not activated then also the global
+ # default settings are missing and we must skip this code.
+ # This can happen in a D-WATO setup where the master has
+ # enabled the EC and the slave not.
+ try:
+ contactgroup = config.mkeventd_notify_contactgroup
+ remote_console = config.mkeventd_notify_remotehost
+ except:
+ return
if not remote_console:
remote_console = ""