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
description="Path"
default="/jsp-examples"/>
</config>
The values of the instance attributes within the OBJECT_NAME is replaced with the value of the configuration
property when used by the plug-in. For example,
"Catalina:type=Cache,host=localhost,path=/jsp-examples"
Defining and Gathering Metrics
Metrics are defined as for other plug-ins but, in the case of custom MBean services, the OBJECT_NAME
property is used to compose the metric template attribute.
Use the OBJECT_NAME property as follows:
<metric name="Access Count"
template="${OBJECT_NAME}:accessCount"
category="THROUGHPUT"
indicator="true"
collectionType="trendsup"/>
This results in the template being expanded. For example,
template="Catalina:type=Cache,host=localhost,path=/jsp-examples:accessCount"
where accessCount is an attribute of the MBean and can be collected internally using the MBeanServer
interface. For example,
ObjectName name = new ObjectName("Catalina:type=Cache,host=localhost,path=/jsp-examples");
return MBeanServer.getAttribute(name, "accessCount");
The MBean interface attributes collected by tomcat-webapp-cache-plugin.xml as metrics are as follows.
public interface WebAppCacheMBean {
public int getAccessCount();
public int getHitCount();
public int getCacheSize();
}
Specifying the Availability Metric for MBeans
vRealize Operations Manager JMX plug-ins typically query for an MBean's "Availability" attribute to
determine whether the MBean is available.
If the MBean server returns 1, the MBean is considered available. If the return value is 0, the MBean is
considered unavailable. Other values cause availability to display incorrectly.
Many MBeans do not have an Availability attribute, therefore vRealize Operations Manager JMX plug-ins
treat an Mbean to as available if the query returns an AttributeNotFoundException exception, assuming that
the MBean is available to report that the attribute does not exist. If the MBean server returns any exception
other than AttributeNotFoundException, the MBean is considered to be unavailable.
Implementing Control Actions
After the OBJECT_NAME property is defined, MBean operations can be exposed as
vRealize Operations Manager control actions by adding the list of method names to the plug-in.
Add the list of method names as follows.
<actions include="reset"/>
Chapter 1 Introduction to Plug-in Development
VMware, Inc. 23