Inventory an AS or EAP server that is running the 'all' or 'production' configuration. In the GUI, go to the server Resource and wait until its traits (buildDate, startDate, partitionName, etc.) have been collected - i.e. verify values are displayed for the traits in the Resource's Summary header. Now run the CLI and connect to the same RHQ Server. Retrieve the same AS server Resource, e.g.: var jvmProxy = ProxyFactory.getResource(12345); (in this example, its Resource id is 12345) Print the Resource's attributes: jvmProxy You should notice that all of the attributes corresponding to traits have values of "?", e.g.: ResourceClientProxy_$$_javassist_0: JVMFreeMemory: ? JVMMaxMemory: ? JVMTotalMemory: ? activeThreadCount: ? activeThreadGroupCount: ? buildDate: ? children: clusterPartitionName: ? contentTypes: {library=JAR Library, cumulativePatch=Cumulative Patch} createdDate: Tue Jul 13 14:57:20 EDT 2010 description: JBoss Enterprise Application Platform handler: id: 10004 measurements: [Start Date, Cluster Partition Name, JVM Free Memory, Transactions Committed per Minute, Total Transactions, Server Home Dir, Transactions Rolledback, Transactions Committed, Active Thread Group Count, Version Name, Server Name, Total Transactions per Minute, Active Thread Count, Transactions Rolledback per Minute, Transactions Rolled Back per Minute, JVM Total Memory, JVM Max Memory, Build Date, Transactions Rolled Back, Partition Name] modifiedDate: Tue Jul 13 14:57:20 EDT 2010 name: 127.0.0.52:1099 operations: [org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@31e46a68, org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@b05eb6f, org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@31a3ca10] partitionName: ? pluginConfiguration: pluginConfigurationDefinition: ConfigurationDefinition[id=10061, name=JBossAS Server] resourceType: JBossAS Server serverHomeDir: ? serverName: ? startDate: ? totalTransactions: ? totalTransactionsperMinute: ? transactionsCommitted: ? transactionsCommittedperMinute: ? transactionsRolledBack: 0.0 transactionsRolledBackperMinute: 0.0 transactionsRolledback: ? transactionsRolledbackperMinute: ? version: 5.1.0.Branch versionName: ?
Dropping the priority on getting this included in the 2.4 release
There are actually a couple of things contributing to this behavior. First, in the CLI, the ResourceProxy class is using a criteria query that is too broad, at least when the jboss-as and jboss-as-5 plugins are involved. Secondly, the server/agent API used to get the metric data accepts a variable number of measurement names but only a single data type for those measurements. This is problematic because there is nothing to guarantee that all of the metrics are of the same type. In fact, in the manual testing I have done while working on this, I frequently see both TRAIT and METRIC for the data type. On the server side, we are using a hard-coded value of METRIC for the data type argument. The method(s) MeasurementManagerLocal.findLiveData and MeasurementManagerRemote.findLiveData will fail any time one of the measurement definitions has a data type other than METRIC.
I have committed fixes for both of the issues described in the previous comment. commit hash: ca289182efed696e10cbda5c8ad2b53ff2bc5acb
I am still not able to get values for the partitionName metric in either the jboss-as or jboss-as-5 plugins. I did some additional debugging with the jboss-as-5 plugin, and the issue does not appear to be related to this bug. I get the following exception in my agent log when trying to get the value for the paritionName metric: ERROR [ResourceContainer.invoker.daemon-16] (org.rhq.plugins.jbossas5.ApplicationServerComponent)- Failed to obtain metric 'MCBean|ServerConfig|*|partitionName'. java.lang.NullPointerException at org.rhq.plugins.jbossas5.util.ManagedComponentUtils.getSimplePropertyValue(ManagedComponentUtils.java:83) at org.rhq.plugins.jbossas5.ApplicationServerComponent.getMetric(ApplicationServerComponent.java:544) at org.rhq.plugins.jbossas5.ApplicationServerComponent.getValues(ApplicationServerComponent.java:248) at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619)
John, Can you open a new BZ issue for the partitionName bug?
Verified on RHQ build#442 Inventoried an JBoss EAP running the 'production' configuration. Installed the Command Line Client. Started the CLI and connected to the RHQ Server. Retrieved the same JBoss EAP server Resource. After running the 'jvmProxy' on cli, observed that the traits does not display ? for non-null values as below: rhqadmin.193.104:7080$ jvmProxy ResourceClientProxy_$$_javassist_0: JVMFreeMemory: 211.5MB JVMMaxMemory: 499.2MB JVMTotalMemory: 499.2MB activeThreadCount: 137.0 activeThreadGroupCount: 15.0 buildDate: 20091020 children: clusterPartitionName: DefaultPartition contentTypes: {library=JAR Library, cumulativePatch=Cumulative Patch} createdDate: Fri Oct 22 15:30:17 IST 2010 description: JBoss Enterprise Application Platform handler: id: 10601 measurements: [Start Date, Cluster Partition Name, JVM Free Memory, Transactions Committed per Minute, Total Transactions, Server Home Dir, Transactions Committed, Active Thread Group Count, Version Name, Server Name, Total Transactions per Minute, Active Thread Count, Transactions Rolled Back per Minute, JVM Total Memory, JVM Max Memory, Build Date, Transactions Rolled Back] modifiedDate: Fri Oct 22 15:30:17 IST 2010 name: sunillaptop.usersys.redhat.com:1099 production operations: [org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@108f8e0, org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@b6ef8, org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@a29c6e] pluginConfiguration: pluginConfigurationDefinition: ConfigurationDefinition[id=10135, name=JBossAS Server] resourceType: JBossAS Server serverHomeDir: /NotBackedUp/jon3.1/eap5/jboss-eap-5.0/jboss-as/server/production serverName: production startDate: Fri Oct 22 15:25:27 IST 2010 totalTransactions: 0.0 totalTransactionsperMinute: 0.0 transactionsCommitted: 0.0 transactionsCommittedperMinute: 0.0 transactionsRolledBack: 0.0 transactionsRolledBackperMinute: 0.0 version: 5.0.0.GA versionName: EAP
Retested this on Build #24 (jon241-release/24) Inventoried an JBoss EAP running the 'production' configuration. Navigated to the server Resource and waited until its traits values are displayed in the Resource's Summary header. Installed the Command Line Client. Started the CLI and connected to the RHQ Server. Retrieved the same JBoss EAP server Resource. After running the 'jvmProxy' on cli, noticed that all of the attributes corresponding to traits have values of "?" as below: rhqadmin.193.104:7080$ jvmProxy ResourceClientProxy_$$_javassist_0: JVMFreeMemory: ? JVMMaxMemory: ? JVMTotalMemory: ? activeThreadCount: ? activeThreadGroupCount: ? buildDate: ? children: clusterPartitionName: ? contentTypes: {library=JAR Library, cumulativePatch=Cumulative Patch} createdDate: Mon Nov 22 18:19:01 IST 2010 description: JBoss Enterprise Application Platform handler: id: 11701 measurements: [Start Date, Cluster Partition Name, JVM Free Memory, Transactions Committed per Minute, Total Transactions, Server Home Dir, Transactions Rolledback, Transactions Committed, Active Thread Group Count, Version Name, Server Name, Total Transactions per Minute, Active Thread Count, Transactions Rolledback per Minute, Transactions Rolled Back per Minute, JVM Total Memory, JVM Max Memory, Build Date, Transactions Rolled Back, Partition Name] modifiedDate: Mon Nov 22 18:19:01 IST 2010 name: localhost.localdomain:1099 production operations: [org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@1b994de, org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@dc9766, org.rhq.enterprise.client.proxy.ResourceClientProxy$Operation@57e787] partitionName: ? pluginConfiguration: pluginConfigurationDefinition: ConfigurationDefinition[id=10125, name=JBossAS Server] resourceType: JBossAS Server serverHomeDir: ? serverName: ? startDate: ? totalTransactions: ? totalTransactionsperMinute: ? transactionsCommitted: ? transactionsCommittedperMinute: ? transactionsRolledBack: 0.0 transactionsRolledBackperMinute: 0.0 transactionsRolledback: ? transactionsRolledbackperMinute: ? version: 5.0.0.GA versionName: ?
Marking as verifed in master based on https://bugzilla.redhat.com/show_bug.cgi?id=614251#c6
Bookkeeping - closing bug - fixed in recent release.