Created attachment 939976 [details]
Description of problem:
See attached screen shot. Following characters @@@ should not be part of the condition.
Version-Release number of selected component (if applicable):
Build Number :
Steps to Reproduce:
1. enable event log on platform resource
a) go to resource's Inventory->Connection Settings
b) add a file event log
2. add an alert definition with condition 'Event Detection' and notification 'Direct Emails'
3. edit the event log file to invoke event which will fire defined alert
4. see received email
The email contains following line:
Condition 1: Event With Severity [INFO] Matching Expression "@@@"
Those '@' characters are not part of defined Regular Expression (it was empty)
Condition 1: Event With Severity [INFO]
When you actually use some Regular Expression in condition the result is following:
Condition 1: Event With Severity [INFO] Matching Expression ".*someString.*@@@"
You see that @ characters are still there but original expression was .*someString.*
This bug is related to bug 1070257
I think it is because of the fact we use '@@@' as a delimiter/meta-symbols on 2 places
1) as a separator between eventDetailsRegex and eventSourceRegex
2) as a placeholder in modules/enterprise/server/jar/src/main/resources/alert-email-template.txt
time: 2014-09-22 18:57:49 +0200
author: Jirka Kremser - firstname.lastname@example.org
message: [BZ 1145101] - Email alert notification field 'Condition' contains
characters which are not part of defined condition - Changing
AlertManagerBean.prettyPrintAlertCondition() method to
incorporate the changes in alert condition instance for events
(the option field is used to carry two regular expression; one
for the event details and one for the event source path).
Jay, could you please do the cherry-pick?
Release/jon3.3.x commit 897a8b3165baed336304f5c2d2f2de1cbce83efb
Author: Jirka Kremser <email@example.com>
Date: Mon Sep 22 18:57:38 2014 +0200
(cherry picked from commit 5e412d56bd3a61f3794f1959e8ce35d7beb47893)
Signed-off-by: Jay Shaughnessy <firstname.lastname@example.org>
Moving to ON_QA as available to test with the latest brew build:
Build Number :