6.1

Table Of Contents
Discovering Custom Properties
Discovery of Custom Properties is supported using the OBJECT_NAME and MBeanServer.getAttribute.
You define a properties tag with any number of property tags where the name attribute value is that of an
MBean attribute:
<properties>
<property name="cacheMaxSize"
description="Maximum Cache Size"/>
</properties>
that maps to the following MBean interface method:
public interface WebAppCacheMBean {
public int getCacheMaxSize();
}
Custom MBean Plug-in Examples
Here are examples of MBean plugins that you can use to assist you in creating your plug-ins.
tomcat-string-cache-plugin.xml
<plugin>
<service name="String Cache"
server="Sun JVM" version="1.5">
<property name="OBJECT_NAME"
value="Catalina:type=StringCache"/>
<property name="AUTOINVENTORY_NAME"
value="%platform.name% Tomcat String Cache"/>
<plugin type="autoinventory"/>
<plugin type="measurement"
class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
<!-- reset is an MBean operation, set* are attribute setters -->
<actions include="reset,setcacheSize,settrainThreshold"/>
<properties>
<property name="cacheSize" description="Cache Size"/>
<property name="trainThreshold" description="TrainThreshold"/>
</properties>
<filter name="template"
value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
template="${OBJECT_NAME}:Availability"
indicator="true"/>
<metric name="Cache Hits"
Endpoint Operations Management Agent Plug-in Development Kit
10 VMware, Inc.