Module: check_mk
Branch: master
Commit: 1eab0296858ba6dc1e7020f93c21993a21e4f5e3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1eab0296858ba6…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Dec 20 16:15:48 2017 +0100
5475 FIX Do not suppress recovery notifications via throttling.
When notification throttling was enabled, recovery notifications were not
handled specially, so they could be suppressed just like problem
notifications. This has been fixed, revovery notifications always pass
through throttling now.
Change-Id: I89cb56ac0842033b859064502b49c4f7db816b98
---
.werks/5475 | 13 +++++++++++++
cmk_base/notify.py | 4 ++++
2 files changed, 17 insertions(+)
diff --git a/.werks/5475 b/.werks/5475
new file mode 100644
index 0000000..232b28d
--- /dev/null
+++ b/.werks/5475
@@ -0,0 +1,13 @@
+Title: Do not suppress recovery notifications via throttling.
+Level: 1
+Component: cmc
+Compatible: compat
+Edition: cee
+Version: 1.5.0i3
+Date: 1513782696
+Class: fix
+
+When notification throttling was enabled, recovery notifications were not
+handled specially, so they could be suppressed just like problem
+notifications. This has been fixed, revovery notifications always pass
+through throttling now.
diff --git a/cmk_base/notify.py b/cmk_base/notify.py
index ff01fc5..acb6abb 100644
--- a/cmk_base/notify.py
+++ b/cmk_base/notify.py
@@ -695,6 +695,10 @@ def rbn_match_escalation(rule, context):
def rbn_match_escalation_throtte(rule, context):
if "match_escalation_throttle" in rule:
+ # We do not want to suppress recovery notifications.
+ if (context["WHAT"] == "HOST" and
context.get("HOSTSTATE", "UP") == "UP") or \
+ (context["WHAT"] == "SERVICE" and
context.get("SERVICESTATE", "OK") == "OK"):
+ return
from_number, rate = rule["match_escalation_throttle"]
if context["WHAT"] == "HOST":
notification_number = int(context.get("HOSTNOTIFICATIONNUMBER",
1))