Hello All,
I am trying to get some JMX metrics into RHQ. All works fine but I have some trouble installing the JMX plugin whith a defaultInterval lower than 30000 (a custom-jmx-plugin-1.0-SNAPSHOT.jar.fixme is left in the update directory when clicking on "scan for updates" in RHQ's Administration tab).
A JMX plugin with the following metrics inside deploys:
<metric property="ServiceTime" displayName="Service time" defaultOn="true" displayType="summary" defaultInterval="30000" description="Time between the first and request and the last response."/>
<metric property="ServiceTime" displayName="Service time" defaultOn="true" displayType="summary" defaultInterval="40000" description="Time between the first and request and the last response."/>
A JMX plugin with the following metrics inside does not deploy:
<metric property="ServiceTime" displayName="Service time" defaultOn="true" displayType="summary" defaultInterval="20000" description="Time between the first and request and the last response."/>
Any help on this would be highly appreciated. Thank, Michael
On 06/09/2011 05:27 AM, BARTH Michael wrote:
some trouble installing the JMX plugin whith a defaultInterval lower than 30000 (a custom-jmx-plugin-1.0-SNAPSHOT.jar.fixme is left in the update directory when clicking on "scan for updates" in RHQ's Administration tab).
As per the documentation/annotation found in the XML Schema for plugin descriptors (rhq-plugin.xsd):
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob;f=modules/core/client-...
default collection intervals must be 30s or higher. See line 201-214 of rhq-plugin.xsd where it defines the defaultInterval schema:
201 <xs:attribute name="defaultInterval"> 202 xs:annotation 203 xs:documentation 204 The default collection interval, in milliseconds. The metric is not necessarily 205 enabled - see the defaultOn attribute for that. The minimum allowed value is 206 30000 (30 seconds). 207 </xs:documentation> 208 </xs:annotation> 209 xs:simpleType 210 <xs:restriction base="xs:unsignedLong"> 211 <xs:minInclusive value="30000"/> 212 </xs:restriction> 213 </xs:simpleType> 214 </xs:attribute>
So, had you been using an XML Editor that validates your plugin descriptor against this XSD schema, it should have flagged that as an invalid value.
We shouldn't silently ignore this though - if we aren't logging an error message at plugin deployment time, we should be. It would be a problem if we do not log an error to let you know why it failed.
A JMX plugin with the following metrics inside deploys:
<metric property="ServiceTime" displayName="Service time" defaultOn="true" displayType="summary" defaultInterval="30000" description="Time between the first and request and the last response."/>
<metric property="ServiceTime" displayName="Service time" defaultOn="true" displayType="summary" defaultInterval="40000" description="Time between the first and request and the last response."/>
A JMX plugin with the following metrics inside does not deploy:
<metric property="ServiceTime" displayName="Service time" defaultOn="true" displayType="summary" defaultInterval="20000" description="Time between the first and request and the last response."/>
Any help on this would be highly appreciated. Thank, Michael
rhq-users mailing list rhq-users@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/rhq-users
As per the documentation/annotation found in the XML Schema for plugin descriptors (rhq-plugin.xsd):
default collection intervals must be 30s or higher. See line 201-214 of rhq-plugin.xsd where it defines the defaultInterval schema:
So, had you been using an XML Editor that validates your plugin descriptor against this XSD schema, it should have flagged that as an invalid value.
We shouldn't silently ignore this though - if we aren't logging an error message at plugin deployment time, we should be. It would be a problem if we do not log an error to let you know why it failed.
I just tried deploying a plugin with one of the metric's default collection interval set to 20000. The following warning was printed in the Server log:
08:58:22,067 WARN [AgentPluginScanner] Failed to scan agent plugin [/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar] found on filesystem. Skipping. Cause: org.rhq.core.clientapi.agent.PluginContainerException: Could not successfully parse the plugin descriptor [META-INF/rhq-plugin.xml found in plugin jar at [file:/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar]
It correctly states that it could not parse the plugin descriptor, but it doesn't give any details as to what was wrong with the plugin descriptor. We can probably print something more informative here. I'll take a peek at the code.
The 30s minimum is to protect against metric flooding and ensure that the plugin can report on metric requests in a fast enough manner.
On 6/10/2011 9:04 AM, Ian Springer wrote:
As per the documentation/annotation found in the XML Schema for plugin descriptors (rhq-plugin.xsd):
default collection intervals must be 30s or higher. See line 201-214 of rhq-plugin.xsd where it defines the defaultInterval schema:
So, had you been using an XML Editor that validates your plugin descriptor against this XSD schema, it should have flagged that as an invalid value.
We shouldn't silently ignore this though - if we aren't logging an error message at plugin deployment time, we should be. It would be a problem if we do not log an error to let you know why it failed.
I just tried deploying a plugin with one of the metric's default collection interval set to 20000. The following warning was printed in the Server log:
08:58:22,067 WARN [AgentPluginScanner] Failed to scan agent plugin [/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar] found on filesystem. Skipping. Cause: org.rhq.core.clientapi.agent.PluginContainerException: Could not successfully parse the plugin descriptor [META-INF/rhq-plugin.xml found in plugin jar at [file:/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar]
It correctly states that it could not parse the plugin descriptor, but it doesn't give any details as to what was wrong with the plugin descriptor. We can probably print something more informative here. I'll take a peek at the code.
rhq-users mailing list rhq-users@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/rhq-users
We shouldn't silently ignore this though - if we aren't logging an error
message at plugin deployment time, we should be. It would be a problem if we do not log an error to let you know why it failed.
I just tried deploying a plugin with one of the metric's default collection interval set to 20000. The following warning was printed in the Server log:
08:58:22,067 WARN [AgentPluginScanner] Failed to scan agent plugin [/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar] found on filesystem. Skipping. Cause: org.rhq.core.clientapi.agent.PluginContainerException: Could not successfully parse the plugin descriptor [META-INF/rhq-plugin.xml found in plugin jar at [file:/home/ips/Projects/rhq/dev-container/jbossas/server/default/deploy/rhq.ear/rhq-downloads/rhq-plugins/jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar]
It correctly states that it could not parse the plugin descriptor, but it doesn't give any details as to what was wrong with the plugin descriptor. We can probably print something more informative here. I'll take a peek at the code.
I checked in a fix to master [1] so that we now log the details of the validation errors, including the line # and column # of the schema violation. Here's an example:
[ERROR] Validation fatal error while parsing [jopr-jboss-as-plugin-4.1.0-SNAPSHOT.jar:META-INF/rhq-plugin.xml] at line 221, column 94: cvc-minInclusive-valid: Value '20000' is not facet-valid with respect to minInclusive '30000' for type '#AnonType_defaultIntervalmetric'.
Similar logging is also done when validation errors occur during parsing of server plugin descriptors.
rhq-users@lists.stg.fedorahosted.org