Module: check_mk
Branch: master
Commit: f35c19350ff28a53219293ddd0dd831e1c0444c0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f35c19350ff28a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 25 16:35:13 2014 +0100
FIX Fix timeperiod computation with CMC and flexible notifications
If you used the Check_MK Micro Core and flexible notifications and
used the state of a timeperiod as a notification condition then
this condition would fail. Timeperiods would be computed just once
after every configuration restart. This has been fixed now.
---
.werks/720 | 12 ++++++++++++
ChangeLog | 1 +
modules/notify.py | 3 +++
3 files changed, 16 insertions(+)
diff --git a/.werks/720 b/.werks/720
new file mode 100644
index 0000000..ca34a9d
--- /dev/null
+++ b/.werks/720
@@ -0,0 +1,12 @@
+Title: Fix timeperiod computation with CMC and flexible notifications
+Level: 1
+Component: notifications
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1393342421
+
+If you used the Check_MK Micro Core and flexible notifications and
+used the state of a timeperiod as a notification condition then
+this condition would fail. Timeperiods would be computed just once
+after every configuration restart. This has been fixed now.
diff --git a/ChangeLog b/ChangeLog
index 6aa1a7c..aa44d66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -296,6 +296,7 @@
* 0108 FIX: Prevent service notification on host alerts...
* 0058 FIX: Fix email notifications containing non-ASCII characters in some situtations...
* 0133 FIX: Fixed mkeventd notification plugin...
+ * 0720 FIX: Fix timeperiod computation with CMC and flexible notifications...
BI:
* 0669 FIX: Fixed regex matching in BI when using character groups [...]...
diff --git a/modules/notify.py b/modules/notify.py
index 04fa0bb..97acb51 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -335,6 +335,9 @@ def notify_keepalive():
while True:
try:
+ # Invalidate timeperiod cache
+ global g_inactive_timerperiods
+ g_inactive_timerperiods = None
# Invalidate timeperiod cache
global g_inactive_timerperiods