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
Writing Plug-ins
While the interface with vRealize Operations Manager plug-ins is straightforward, you also must determine
how to retrieve data from a managed resources and how it should appear in the inventory model, and at
what level.
Plug-in Naming
Plug-in names must be in the following formats, where PluginName is the name of the plug-in, as specified in
the root plugin element of the plug-in descriptor:
n
PluginName-plugin.jar for a plug-in that contains program or script files in addition to the plug-in
XML descriptor.
n
PluginName-plugin.xml for a plug-in that consists only of the plug-in XML descriptor.
JMX Plug-in
Auto-discovery (called "auto-inventory" within plug-ins) is easily implemented by implementing a
vRealize Operations Manager-provided autoinventory plug-in.
To implement auto-discovery at the server level, you must invoke an autoinventory plug-in with the
MxServerDetector class within the server tag:
<server name="Java Server Name" version ="version #">
...
<plugin type="autoinventory" class="org.hyperic.hq.product.jmx.MxServerDetector"/>
...
</server>
In the case of service, auto-discovery is supported for custom MBean services, driven by the OBJECT_NAME
property. To implement auto-discovery at the service level, invoke the autoinventory plug-in, leaving out
the class attribute, within a service tag:
<service name="Java Service Name">
...
<plugin type="autoinventory"/>
...
</service>
The JMX plug-in uses the MBeanServer.queryNames method to discover a service for each MBean instance. In
the case where the OBJECT_NAME contains configuration properties, the properties are auto-configured.
By default, auto-discovered service names are composed using the hosting-server name, configuration
properties, and service type name. For example:
"myhost Sun JVM 1.5 localhost /jsp-examples WebApp String Cache"
You can override the naming using the AUTOINVENTORY_NAME property:
<property name="AUTOINVENTORY_NAME"
value="%platform.name% %path% Tomcat WebApp String Cache"/>
You can use the configuration properties from the platform, hosting server, and the service itself in the
%replacement% strings, resulting in a name such as:
"myhost /jsp-examples Tomcat WebApp String Cache"
Chapter 1 Introduction to Plug-in Development
VMware, Inc. 9