Bug 965201

Summary: Recent alerts list/report should include event text in addition to conditions
Product: [Other] RHQ Project Reporter: Elias Ross <genman>
Component: Core UIAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5CC: genman, hrupp
Target Milestone: ---   
Target Release: RHQ 4.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1006243 (view as bug list) Environment:
Last Closed: 2013-09-11 09:53:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1006243    

Description Elias Ross 2013-05-20 17:04:30 UTC
Condition Text currently only shows the severity of the alert (INFO or ERROR) and optionally the conditions.

It does not show the 'event source', which is useful, nor the text of the alert. If space allows, another column would be good for this. We have alerts for many hosts ('sources') that originate from one SNMP trap listener and we can't see the actual alert text or host.

Comment 1 Elias Ross 2013-06-12 20:10:28 UTC
This patch might work, but I need to test it:

diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java b/modules/enterpr
index 1bfb3a7..eb1c275 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertFormatUtility.java
@@ -25,6 +25,7 @@
 import org.rhq.core.domain.alert.Alert;
 import org.rhq.core.domain.alert.AlertCondition;
 import org.rhq.core.domain.alert.AlertConditionCategory;
+import org.rhq.core.domain.alert.AlertConditionLog;
 import org.rhq.core.domain.alert.AlertConditionOperator;
 import org.rhq.core.domain.alert.AlertDefinition;
 import org.rhq.core.domain.measurement.MeasurementUnits;
@@ -228,6 +229,9 @@ public static String formatAlertConditionForDisplay(AlertCondition condition) {
                 str.append(condition.getOption());
                 str.append("'");
             }
+            for (AlertConditionLog log : condition.getConditionLogs()) {
+                str.append(" '").append(log.getValue()).append("'");
+            }
             break;
         }
         case DRIFT: {

Comment 2 Heiko W. Rupp 2013-06-12 20:14:19 UTC
Elias, you write

"Condition Text currently only shows"

where is that? In all places like list of alerts for a resource, or reports or?

Thanks
  Heiko

Comment 3 Elias Ross 2013-06-13 01:18:41 UTC
Reports -> Recent Alerts

I'm thinking: http://localhost:7080/coregui/#Reports/Subsystems/RecentAlerts

though I think there are other similar views.

The 'Condition Text' column should have the text from the Event. It currently only shows:

Event Detection [INFO]

in this column.

Comment 4 Heiko W. Rupp 2013-06-14 07:34:30 UTC
The 'Condition Text' is the condition you set to match, but not the matched value that you are interested in.

Currently the event line shows the condition and when you click on the creation time you can click on "conditions" to see the value.

Having said that, I can see that
a) it is hard to see the interesting stuff from the list
b) it is tedious to click 2 times to see the condition logs

Just adding a column for the source to the list does not sound good to me, as this
would be empty for most cases

Comment 5 Heiko W. Rupp 2013-06-14 09:04:25 UTC
First part is in master dad4e56a7b

Still need to think about the event source.
This is hidden in the resource and resource type.

This could perhaps be displayed in a column that is by default hidden

Comment 6 Heiko W. Rupp 2013-09-10 09:57:19 UTC
Putting this on_qa for the text. The addition of the event source has been captured in a different BZ

Comment 7 Heiko W. Rupp 2013-09-11 09:53:25 UTC
Bulk closing of old issues now that HRQ 4.9 is in front of the door.

If you think the issue has not been solved, then please open a new bug and mention this one in the description.