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:
Created attachment 523360 [details] Alert Email Details
what is this attachment? it has no extension and my system can't open it - just thinks its a raw binary file.
Created attachment 523365 [details] Alert Email Details_2
Attached the text file for alert email details..
i'm pretty sure the code that needs to be fixed is in here: org.rhq.enterprise.server.alert.AlertManagerBean.prettyPrintAlertCondition(AlertCondition, boolean)
sha commit eb50b72
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.
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE