Bug 1145101 - Email alert notification field 'Condition' contains characters which are not part of defined condition
Summary: Email alert notification field 'Condition' contains characters which are not ...
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring - Alerts
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER05
: JON 3.3.0
Assignee: Jirka Kremser
QA Contact: Filip Brychta
Depends On:
TreeView+ depends on / blocked
Reported: 2014-09-22 11:40 UTC by Filip Brychta
Modified: 2014-12-11 14:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-12-11 14:03:20 UTC
Type: Bug

Attachments (Terms of Use)
email (40.73 KB, image/png)
2014-09-22 11:40 UTC, Filip Brychta
no flags Details

Description Filip Brychta 2014-09-22 11:40:00 UTC
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):
Version :	
Build Number :	

How reproducible:

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

Actual results:
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)

Expected results:
Condition 1: Event With Severity [INFO]

Additional 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.*

Comment 1 Jirka Kremser 2014-09-22 12:26:54 UTC
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


Comment 2 Jirka Kremser 2014-09-22 17:00:19 UTC
branch:  master
link:    https://github.com/rhq-project/rhq/commit/5e412d56b
time:    2014-09-22 18:57:49 +0200
commit:  5e412d56bd3a61f3794f1959e8ce35d7beb47893
author:  Jirka Kremser - jkremser@redhat.com
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?

Comment 3 Jay Shaughnessy 2014-09-22 20:22:04 UTC
Release/jon3.3.x commit 897a8b3165baed336304f5c2d2f2de1cbce83efb
Author: Jirka Kremser <jkremser@redhat.com>
Date:   Mon Sep 22 18:57:38 2014 +0200

    (cherry picked from commit 5e412d56bd3a61f3794f1959e8ce35d7beb47893)
    Signed-off-by: Jay Shaughnessy <jshaughn@redhat.com>

Comment 4 Simeon Pinder 2014-10-21 20:24:28 UTC
Moving to ON_QA as available to test with the latest brew build:

Comment 5 Filip Brychta 2014-10-22 11:51:57 UTC
Verified on
Version :	
Build Number :	

Note You need to log in before you can comment on or make changes to this bug.