http://jira.hyperic.com/browse/HHQ-2171
The method 'metric.getCategory()' return NULL value when a plugin is executed by command line, also when the servers discovered by the plugin are imported in the inventory.
Metric definition: (see source code)
<metric name="usage" template="service:${props_service}:USAGE" category="UTILIZATION" indicator="true" units="percentage" collectionType="dynamic" interval="60000" defaultOn="true"/>
agent.log: (find complete log fie attached)
2008-06-05 17:35:11,882 INFO [main] [TestMeasurement] (getValue) metric => service:SERVER_NAME=TestServer,SERVICE_NAME=A:USAGE
2008-06-05 17:35:11,882 INFO [main] [TestMeasurement] (getValue) metric.getCategory() => null
.
.
2008-06-05 17:36:00,016 INFO [ScheduleThread] [TestMeasurement] (getValue) metric => service:SERVER_NAME=TestServer,SERVICE_NAME=A:USAGE
2008-06-05 17:36:00,016 INFO [ScheduleThread] [TestMeasurement] (getValue) metric.getCategory() => UTILIZATION
.
.
2008-06-05 17:37:00,016 INFO [ScheduleThread] [TestMeasurement] (getValue) metric => service:SERVER_NAME=TestServer,SERVICE_NAME=A:USAGE
2008-06-05 17:37:00,016 INFO [ScheduleThread] [TestMeasurement] (getValue) metric.getCategory() => UTILIZATION
I've attached command line StdOut, the test-plugin (and the source code) and agent log
Anonymous