Bug 753585 - data not showing up auto-group/auto-cluster Summary>Measurements portlet
data not showing up auto-group/auto-cluster Summary>Measurements portlet
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
Unspecified Unspecified
high Severity unspecified (vote)
: ---
: RHQ 4.3.0,JON 3.0.0
Assigned To: John Mazzitelli
Mike Foley
Depends On:
Blocks: jon30-sprint8
  Show dependency treegraph
Reported: 2011-11-13 11:19 EST by Charles Crouch
Modified: 2015-02-01 18:27 EST (History)
3 users (show)

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

Attachments (Terms of Use)
screenshot of verification (109.85 KB, image/png)
2011-11-17 11:26 EST, Mike Foley
no flags Details

  None (edit)
Description Charles Crouch 2011-11-13 11:19:13 EST
I inventoried an EAP4.3 instance and it started being monitored and availability was green, i.e. in the Monitoring>Graphs tab I could see little green dots and a couple of graphs showing data points. However if I went to the Summary tab, the Resource:Measurements portlet said something like "No metrics available" I left everything running over night and came back the next day and the four summary metrics were showing up in the Resource:Measurements portlet. We should investigate what is happening and see if anyone else can reproduce.

IMHO as soon as a metric is being collected it should show up in the Resource:Measurements portlet. That way people can quickly see the state of their metrics and also easily click through to the Big Chart view directly from the Summary tab, instead of having to go to the Monitor>Tables tab and hit Chart Selected Metric. 

Version JON3.0.0.CR1
Comment 1 Heiko W. Rupp 2011-11-14 06:32:12 EST
I can't reproduce this for single resources, but for resource groups.
Comment 2 Charles Crouch 2011-11-14 09:31:34 EST
IIRC I saw this also on single resources, after enabling a new metric to be 
collected.It wouldnt show up in the portlet for a while
Comment 3 John Mazzitelli 2011-11-14 17:08:16 EST
The problem I see is in an auto-group node. But the code doesn't know its an auto-group node and thus fails to find the group:

        final boolean isAutoCluster = isAutoCluster();
        final boolean isAutoGroup = isAutoGroup();

are both false in my case. I selected the "JBossAS Server" parent auto-group node found under my platform.

We need to be clear this summary tab we are looking at because the code is dependent on the type of group.

Once my resource got metrics, I was able to see data in the resource metric portlet.
Comment 4 John Mazzitelli 2011-11-14 17:11:05 EST
baseViewPath is null - which explains why it doesn't know if its an autogroup or autocluster:

    private boolean isAutoGroup() {
        return ResourceGroupDetailView.AUTO_GROUP_VIEW.equals(getBaseViewPath());

    private boolean isAutoCluster() {
        return ResourceGroupDetailView.AUTO_CLUSTER_VIEW.equals(getBaseViewPath());

    public String getBaseViewPath() {
        return baseViewPath;
Comment 5 John Mazzitelli 2011-11-14 17:13:17 EST
So, I can't see how this EVER worked.

    protected String baseViewPath = "";

is never set that I can see. So auto-group and auto-cluster group metric portlets (as far as I can tell) have never worked.
Comment 6 John Mazzitelli 2011-11-15 16:50:43 EST
(In reply to comment #5)
> So, I can't see how this EVER worked.
>     protected String baseViewPath = "";
> is never set that I can see. So auto-group and auto-cluster group metric
> portlets (as far as I can tell) have never worked.

BTW: this is class GroupMetricsPortlet
Comment 7 John Mazzitelli 2011-11-15 17:01:28 EST
looks like same (bad) code pattern in GroupOperationsPortlet - so we'd need to fix that too
Comment 8 John Mazzitelli 2011-11-15 18:06:49 EST
git commit to master: deabf9f

this is not committed to release branch yet.

to test:

1) import something that has children resources - wait for metrics to come in
2) go to a auto-group node in the left hand tree
3) execute an operation on the group (assuming the resource supports operations - if you import the RHQ Server, you can use the Hibernate Statistics auto-group)
4) see that the auto-group's metrics and operations show up in the portlets in the activity subtab
5) create a normal recursive group (you can put your platform in it).
6) in the auto-cluster nodes do the same - see if you can execute a group op and see it in the ops portlet. see if you see metrics in the metric portlet
Comment 9 Simeon Pinder 2011-11-16 19:32:00 EST
Looks good from what I can see. It looks like that was never implemented correctly.  The fix looks clean as well as it just plain would not have worked before. This should be cherry-picked to release_jon3.x.
Comment 10 John Mazzitelli 2011-11-16 20:32:22 EST
git commit to release_jon3.x branch: 292cf4c
Comment 11 Mike Foley 2011-11-17 11:26:17 EST
okay ... i am almost ready to mark this verified 11/17/2011 jon 3 branch.  i am attaching an image to document the verification.  there is one little thing i am not so sure about ... on step #4 in comment #8 ... i do see operations (documented in the image), but i don't see metrics (also documented in the image).  i need to drill further into the hibernate auto-group ... and then i do see some metrics.  but not at the auto-group level.  mazz, is this correct?
Comment 12 Mike Foley 2011-11-17 11:26:51 EST
Created attachment 534234 [details]
screenshot of verification
Comment 13 John Mazzitelli 2011-11-17 11:48:52 EST
an easy way to think of this is - first look at the resources that make up the members of the group (in your image's case, the member resource is the child "RHQ" node, under "Hibernate Statistics"). If you have metrics for member resources (e.g. look at your "RHQ" resource's resource metrics portlet for data) you should have metrics in the parent auto-group's group portlet. If you don't have resource metrics, then obviously, the group portlet won't have any either (since the group portlet is simply an aggregation of all metrics of child members).

In your case, you probably don't have metrics yet for that RHQ resource. Since its the only member of that auto-group, the group portlet won't have anything either. Go in RHQ resource to confirm. If RHQ resource DOES have metrics, but the group portlet does not, this fix does not verify.

You can wait for metrics or you can try another auto-group to test. Go to the "Hibernate Entities" auto-group (which is in your attached image) and see if it has metrics (again, to see if you should have metrics, go to one or more of its child member resource nodes and see if they have metrics - the group portlet will aggregate those metrics, but if you have none, the group metric won't show any either).
Comment 14 Mike Foley 2011-11-17 11:51:41 EST
i am seeing the data now
Comment 15 Mike Foley 2012-02-07 14:17:15 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.