Bug 1031556 - Unexpected MeasurementScheduleRequest with metric name "rhq.availability"
Summary: Unexpected MeasurementScheduleRequest with metric name "rhq.availability"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Monitoring
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: RHQ 4.10
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1032685
TreeView+ depends on / blocked
 
Reported: 2013-11-18 09:47 UTC by Thomas Segismont
Modified: 2014-04-23 12:32 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 1032685 (view as bug list)
Environment:
Last Closed: 2014-04-23 12:32:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Thomas Segismont 2013-11-18 09:47:32 UTC
Description of problem:
Unexpected MeasurementScheduleRequest with metric name "rhq.availability"

"rhq.availability" should never be passed to #getValues

Version-Release number of selected component (if applicable):
4.9-SNAPSHOT

How reproducible:
Always

Steps to Reproduce:
1.Inventory a Tomcat server
2.Watch the agent logs

Actual results:

Exception thrown because most Tomcat components expect a ":" in the metric name.

2013-11-18 10:20:44,733 ERROR [WorkerThread#0[127.0.0.1:52296]] (rhq.core.pc.measurement.MeasurementManager)- Could not get measurement values
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1911)
	at org.jboss.on.plugins.tomcat.TomcatConnectorComponent.getValues(TomcatConnectorComponent.java:137)
	at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)


Expected results:
No exception

Comment 1 Thomas Segismont 2013-11-18 10:44:12 UTC
It looks like it happens only when you change the availability schedule of a resource.

Comment 2 Thomas Segismont 2013-11-18 17:35:50 UTC
Eventually found the exact details. These supersede the details from Comment #1

How reproducible:
Always

Steps to Reproduce:
1.Inventory a Tomcat server
2.Navigate to the Monitoring > Metrics tab

Actual results:

Exception thrown because most Tomcat components expect a ":" in the metric name.

2013-11-18 10:20:44,733 ERROR [WorkerThread#0[127.0.0.1:52296]] (rhq.core.pc.measurement.MeasurementManager)- Could not get measurement values
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1911)
	at org.jboss.on.plugins.tomcat.TomcatConnectorComponent.getValues(TomcatConnectorComponent.java:137)
	at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)


Expected results:
No exception

Additional info:
This comes from the MetricsViewDataSource#queryResourceMetrics implementation. We query all resource metrics, even those with data type "AVAILABILITY".

Comment 3 Thomas Segismont 2013-11-18 17:38:49 UTC
commit 9837ddc08e8cd47714ac92c508b707b42acd88bb
Author: Thomas Segismont <tsegismo>
Date:   Mon Nov 18 18:38:02 2013 +0100

When looking for live data, filter measurement definitions to exclude those of data type AVAILABILITY

Comment 4 Heiko W. Rupp 2014-04-23 12:32:03 UTC
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.


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