Module: check_mk
Branch: master
Commit: 5bb6d8d3ae72adcb5ecbe4486ba4c14b10f945aa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bb6d8d3ae72ad…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 6 18:51:27 2015 +0200
#2189 FIX Allow changing graph number from 1 to "all" when editing PNP graph in report
The problem was that when you edited a report element of type PNP graph and wanted
to change from one specific graph to the list of all graphs of that service you
wouldn't be able to save your change. Creating new elements worked, nevertheless.
---
.werks/2189 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/forms.py | 3 ++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/2189 b/.werks/2189
new file mode 100644
index 0000000..7584909
--- /dev/null
+++ b/.werks/2189
@@ -0,0 +1,12 @@
+Title: Allow changing graph number from 1 to "all" when editing PNP graph in report
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428338979
+
+The problem was that when you edited a report element of type PNP graph and wanted
+to change from one specific graph to the list of all graphs of that service you
+wouldn't be able to save your change. Creating new elements worked, nevertheless.
diff --git a/ChangeLog b/ChangeLog
index c1c697b..cfbbf3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -442,6 +442,7 @@
Reporting & Availability:
* 1990 FIX: Fix two exceptions in PDF exports of host group views
+ * 2189 FIX: Allow changing graph number from 1 to "all" when editing PNP graph in report...
Event Console:
* 1845 Keep record of original source IP address of a syslog message or SNMP trap...
diff --git a/web/htdocs/forms.py b/web/htdocs/forms.py
index 28119c6..62f8312 100644
--- a/web/htdocs/forms.py
+++ b/web/htdocs/forms.py
@@ -70,8 +70,8 @@ def edit_dictionaries(dictionaries, value, focus=None, hover_help=True,
messages = []
new_value = {}
for keyname, section_title, entries in sections:
- new_value[keyname] = value.get(keyname, {}).copy()
if type(entries) == list:
+ new_value[keyname] = value.get(keyname, {}).copy()
for name, vs in entries:
if len(sections) == 1:
vp = varprefix
@@ -86,6 +86,7 @@ def edit_dictionaries(dictionaries, value, focus=None, hover_help=True,
html.add_user_error(e.varname, e.message)
else:
+ new_value[keyname] = {}
try:
edited_value = entries.from_html_vars(keyname)
entries.validate_value(edited_value, keyname)
Module: check_mk
Branch: master
Commit: 9f4c50ee05e095e5e6c769fe7b683b747004118e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f4c50ee05e095…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Apr 6 00:39:53 2015 +0200
Updated bug entries #2299
---
.bugs/2299 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/2299 b/.bugs/2299
new file mode 100644
index 0000000..43f1f74
--- /dev/null
+++ b/.bugs/2299
@@ -0,0 +1,10 @@
+Title: check_mks active events: match on original IP-address from mkeventd
+Component: ec
+State: open
+Date: 2015-04-06 00:35:52
+Targetversion: 1.2.7
+Class: feature
+
+The active events check should have the feature to match on the original
+IP-address where the syslog or snmptraps where coming from. This is known
+to mkeventd in newer versions.
Module: check_mk
Branch: master
Commit: c4364765803862072f4fa7ef0c8d3b3024001e38
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c4364765803862…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 2 12:25:12 2015 +0200
#2188 Rule based notification now allow match for notification comment
A new condition allows a match on the notification comment. This comment
is supplied in custom notifications - never in normal notifications. This
allows to create custom commands that e.g. open tickets by creating custom
notifications with a certain text in the comment.
---
.werks/2188 | 12 ++++++++++++
ChangeLog | 1 +
modules/notify.py | 9 +++++++++
web/htdocs/wato.py | 14 ++++++++++++--
4 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/.werks/2188 b/.werks/2188
new file mode 100644
index 0000000..d687b0e
--- /dev/null
+++ b/.werks/2188
@@ -0,0 +1,12 @@
+Title: Rule based notification now allow match for notification comment
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.7i1
+Date: 1427970243
+Class: feature
+
+A new condition allows a match on the notification comment. This comment
+is supplied in custom notifications - never in normal notifications. This
+allows to create custom commands that e.g. open tickets by creating custom
+notifications with a certain text in the comment.
diff --git a/ChangeLog b/ChangeLog
index 6f11239..c1c697b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -425,6 +425,7 @@
* 2041 Notification Spooler can now handle incoming and outgoing persistent TCP connections...
* 2135 Allow to filter notification contacts based on values of custom macros...
* 1235 Added notification plugin for Braintwoer SMS Gateways...
+ * 2188 Rule based notification now allow match for notification comment...
* 1661 FIX: mknotifyd: improved performance when receiving forwarded notifications
* 1664 FIX: mknotifyd: further performance improvements for notification forwarding
* 1205 FIX: RBN: Fixed match contactgroup condition...
diff --git a/modules/notify.py b/modules/notify.py
index 1f91435..5ba3246 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -670,6 +670,7 @@ def rbn_match_rule(rule, context):
rbn_match_servicelevel(rule, context) or \
rbn_match_host_event(rule, context) or \
rbn_match_service_event(rule, context) or \
+ rbn_match_notification_comment(rule, context) or \
rbn_match_event_console(rule, context)
@@ -971,6 +972,14 @@ def rbn_rule_contacts(rule, context):
return all_enabled
+def rbn_match_notification_comment(rule, context):
+ if "match_notification_comment" in rule:
+ r = regex(rule["match_notification_comment"])
+ notification_comment = context.get("NOTIFICATIONCOMMENT", "")
+ if not r.match(notification_comment):
+ return "The beginning of the notification comment '%s' is not matched by the regex '%s'" % (
+ notification_comment, rule["match_notification_comment"])
+
def rbn_match_event_console(rule, context):
if "match_ec" in rule:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b58f738..d9a0ffa 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8539,6 +8539,16 @@ def vs_notification_rule(userid = None):
default_value = [ 'rw', 'rc', 'ru', 'wc', 'wu', 'uc', 'f', 's', 'x' ],
)
),
+ ( "match_notification_comment",
+ RegExpUnicode(
+ title = _("Match notification comment"),
+ help = _("This match only makes sense for custom notifications. When a user creates "
+ "a custom notification then he/she can enter a comment. This comment is shipped "
+ "in the notification context variable <tt>NOTIFICATIONCOMMENT</tt>. Here you can "
+ "make a condition of that comment. It is a regular expression matching the beginning "
+ "of the comment."),
+ size = 60,
+ )),
( "match_ec",
Alternative(
title = _("Event Console alerts"),
@@ -8667,7 +8677,7 @@ def vs_notification_rule(userid = None):
optional_keys = [ "match_folder", "match_hosttags", "match_hostgroups", "match_hosts", "match_exclude_hosts",
"match_services", "match_servicegroups", "match_contactgroups", "match_exclude_services", "match_plugin_output",
"match_timeperiod", "match_escalation", "match_escalation_throttle",
- "match_sl", "match_host_event", "match_service_event", "match_ec",
+ "match_sl", "match_host_event", "match_service_event", "match_ec", "match_notification_comment",
"match_checktype", "bulk", "contact_users", "contact_groups", "contact_emails", "contact_match_macros" ],
headers = [
( _("Rule Properties"), [ "description", "comment", "disabled", "docu_url", "allow_disable" ] ),
@@ -8678,7 +8688,7 @@ def vs_notification_rule(userid = None):
"match_services", "match_servicegroups", "match_contactgroups", "match_exclude_services", "match_plugin_output",
"match_checktype", "match_timeperiod",
"match_escalation", "match_escalation_throttle",
- "match_sl", "match_host_event", "match_service_event", "match_ec" ] ),
+ "match_sl", "match_host_event", "match_service_event", "match_ec", "match_notification_comment" ] ),
],
render = "form",
form_narrow = True,