I saw that the Tomcat plugin includes the hibernate-services.xml service snippet so I exported by Hibernate StatisticsService from my webapp as the required
Hibernate:type=statistics,application=%application%
The service was auto-discovered but failed to record any metrics. When I browsed to the service I got an error something like "hyperic.jmx:name=HQInternal not found".
This was a bit weird seeing as this is the OBJECT_NAME used in the hq-internal-services.xml snippet that is also included in the Tomcat plugin.
I tracked the error down and fixed it by changing the Availability metric in the hibernate-services.xml file.
-- <metric name="Availability" indicator="true" />
++ <metric name="Availability" indicator="true" template="${OBJECT_NAME}:Availability"/>
The problem was that the hibernate snippet does not use a 'template' and therefore the Availablity metric seemed to be using the template defined in the hq-internal-services.xml snippet.
I would also suggest that the code should be changed to clear out any templates defined in a service when parsing that service has completed.
Hibernate:type=statistics,application=%application%
The service was auto-discovered but failed to record any metrics. When I browsed to the service I got an error something like "hyperic.jmx:name=HQInternal not found".
This was a bit weird seeing as this is the OBJECT_NAME used in the hq-internal-services.xml snippet that is also included in the Tomcat plugin.
I tracked the error down and fixed it by changing the Availability metric in the hibernate-services.xml file.
-- <metric name="Availability" indicator="true" />
++ <metric name="Availability" indicator="true" template="${OBJECT_NAME}:Availability"/>
The problem was that the hibernate snippet does not use a 'template' and therefore the Availablity metric seemed to be using the template defined in the hq-internal-services.xml snippet.
I would also suggest that the code should be changed to clear out any templates defined in a service when parsing that service has completed.