Bug 738614 - Alert email received displays null in Conditions section
Alert email received displays null in Conditions section
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.1
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: jon30-bugs
  Show dependency treegraph
 
Reported: 2011-09-15 07:38 EDT by Sunil Kondkar
Modified: 2012-02-07 14:23 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:23:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Alert Email Details (2.32 KB, application/octet-stream)
2011-09-15 07:40 EDT, Sunil Kondkar
no flags Details
Alert Email Details_2 (2.32 KB, text/plain)
2011-09-15 08:23 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Sunil Kondkar 2011-09-15 07:38:43 EDT
Description of problem:

Created an alert on EJB3 Session Bean resource (Ex: AvailabilityManagerBean ) with below calltime alert conditions 

1. Call Time Value threshold [Method Invocation Time AVG < 50.0ms] 

2. Call Time Value Changes [Method Invocation Time AVG Changes by atleast 2.0% ]

When alert is fired, the email received displays 'null' in the 'Conditions' section as below:

1. Conditions: 
  - Condition 1: null < 50.0ms
  - Date/Time: 2011/09/15 15:25:46 IST
  - Details: [From:Sep 15, 2011 3:25:46 PM, To:Sep 15, 2011 3:56:32 PM, AVG:5.428571428571429], extraInfo=[updateLastAvailabilityReport]


2. Conditions: 
  - Condition 1: null value changed
  - Date/Time: 2011/09/15 15:25:46 IST
  - Details: [From:Sep 15, 2011 3:25:46 PM, To:Sep 15, 2011 3:56:32 PM, AVG:5.428571428571429], extraInfo=[updateLastAvailabilityReport]

Please refer the attached screenshot where i have pasted details of both the alert emails received.

Version-Release number of selected component (if applicable):
Build#411 (Version: 4.1.0-SNAPSHOT Build Number: 1a66725)

How reproducible:
Always

Steps to Reproduce:

1. Login to RHQ

2. Navigate to the 'RHQ Server->Applications->EJB3 Session Beans->AvailabilityManagerBean' resource.

3. Navigate to the 'Monitoring->Schedules' tab and enable and set collection interval for the metric 'Method Invocation Time' to 30 seconds.

4. Create an alert on the resource using below condition:

 Condition Type: 'Call Time Value threshold'
 Call Time Metric: 'method Invocation Time'
 Call Time Limit: Average
 Comparator: < (Less Than)
 Call Time Value: 50

5. Enter the email id in Notification tab using 'Direct Emails' option and save the alert definition.

6. Wait till the alert fires.

7. Observe the email received.
  
Actual results:

Alert email received displays null in Conditions section

Expected results:

Correct condition should be displayed in the alert email received.

Additional info:
Comment 1 Sunil Kondkar 2011-09-15 07:40:19 EDT
Created attachment 523360 [details]
Alert Email Details
Comment 2 John Mazzitelli 2011-09-15 08:17:34 EDT
what is this attachment? it has no extension and my system can't open it - just thinks its a raw binary file.
Comment 3 Sunil Kondkar 2011-09-15 08:23:29 EDT
Created attachment 523365 [details]
Alert Email Details_2
Comment 4 Sunil Kondkar 2011-09-15 08:25:16 EDT
Attached the text file for alert email details..
Comment 5 John Mazzitelli 2011-09-15 09:05:00 EDT
i'm pretty sure the code that needs to be fixed is in here:

org.rhq.enterprise.server.alert.AlertManagerBean.prettyPrintAlertCondition(AlertCondition, boolean)
Comment 6 John Mazzitelli 2011-09-15 22:59:37 EDT
sha commit eb50b72
Comment 7 Sunil Kondkar 2011-09-16 06:02:01 EDT
Verified on build#421 (Version: 4.1.0-SNAPSHOT Build Number: ad51846)

The Correct condition is displayed in the alert email received for both calltime alert conditions as below:


Conditions: 
  - Condition 1: Calltime Metric Method Invocation Time AVG < 50.0ms

Conditions: 
  - Condition 1: Calltime Metric Method Invocation Time AVG changes by at least 2.0%

Marking as verified.
Comment 8 Mike Foley 2012-02-07 14:23:22 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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