6.1
Table Of Contents
- Endpoint Operations Management Agent Plug-in Development Kit
- Contents
- About the Endpoint Operations Management Agent Plug-in Development Kit
- Introduction to Plug-in Development
- The Role of the Server and Agent in Plug-ins
- Technical Overview
- Plug-in Implementations
- Using Support Classes to Simplify a Plug-in
- Writing Plug-ins
- JMX Plug-in
- Script Plug-ins
- SNMP Plug-in
- JMX-Based Management
- Auto-Discovery of JMX Resources
- Configuration Properties for JMX Monitoring
- Creating a Custom JMX Plug-in
- Defining Service Types to Provide Management via Custom MBeans
- Defining an ObjectName to Access Custom MBeans
- Defining Configuration Properties to Appear in the User Interface
- Defining and Gathering Metrics
- Specifying the Availability Metric for MBeans
- Implementing Control Actions
- Defining the Server Auto-Inventory Element
- Discovering Custom Properties
- Running and Testing Plug-ins from the Command Line
- Using Auto-Discovery Support Classes in Plug-ins
- Working with Plug-in Descriptors
- Plug-In Support Classes
- Index
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.