Module: check_mk
Branch: master
Commit: b5d86821a4275b795e309b9b55502eb282de2f19
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b5d86821a4275b…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Oct 14 16:00:27 2014 +0200
#1186 RBN: It's now possible to Filter for contactgroups
This feature only works with cmc (Check_MK Microcore) because Nagios doesn't have the
needed context information.
---
.werks/1186 | 10 ++++++++++
ChangeLog | 1 +
modules/notify.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1186 b/.werks/1186
new file mode 100644
index 0000000..5845669
--- /dev/null
+++ b/.werks/1186
@@ -0,0 +1,10 @@
+Title: RBN: It's now possible to Filter for contactgroups
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.5i6
+Date: 1413295156
+Class: feature
+
+This feature only works with cmc (Check_MK Microcore) because Nagios doesn't have the
needed context information.
+
diff --git a/ChangeLog b/ChangeLog
index b6584a9..2f4fb96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -147,6 +147,7 @@
* 1394 HTML notifications have a new content field for debugging variables...
* 1400 Added example notification script for Pushover to
doc/treasures/notifications...
* 1123 Rule based notifications: New condition "Match Service Groups"
+ * 1186 RBN: It's now possible to Filter for contactgroups...
* 1156 FIX: Graphs in HTML mails are now sent again where they where missing...
* 1157 FIX: Fixed SMS plugin on at least debian (distrs which have no
sendsms/smssend)...
* 1407 FIX: Fix exception in rule based notification on non-Ascii characters in log
message
diff --git a/modules/notify.py b/modules/notify.py
index ec09c31..3299cb1 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -699,7 +699,7 @@ def rbn_match_servicegroups(rule, context):
def rbn_match_contactgroups(rule, context):
required_groups = rule.get("match_contactgroups")
if context["WHAT"] != "SERVICE":
- cgn = context.get("SERVICECONTACTS")
+ cgn = context.get("SERVICECONTACTGROUPNAMES")
else:
cgn = context.get("HOSTCONTACTGROUPNAMES")