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
<metric name="Size"
alias="cacheSize"/>
</service>
</plugin>
Script Plug-ins
A script plug-in is a plug-in that runs one or more scripts that return process metrics.
A script plug-in uses the org.hyperic.hq.product.DaemonDetector support to discover resources from the
process table — DaemonDetector runs a PTQL process.query.
Script Plug-in Contents and Packaging
A script plug-in comprises the following components.
n
An XML plug-in descriptor that defines the monitored process and its properties, along with the
metrics that the script reports.
n
A script that returns metric name: value pairs.
You can embed your script in the XML plug-in descriptor, in which case you deploy only the XML file.
If your script is in its own file, you reference it in the descriptor, and deploy an archive containing the
script and the descriptor.
Save the script in AgentHome/bundles/AgentBundleDir/pdk/scripts/, or in the XML descriptor.
Requirements for Script
Note the following requirements for writing a script plug-in.
n
The script can be written in any required language. For example, Batch for Windows and Shell for
Linux.
n
A measurement script must report metrics as name-value pairs. For example,
% ./pdk/scripts/device_iostat.pl sda
rrqm/s=0.02
wrqm/s=0.59
r/s=0.07
w/s=0.54
rsec/s=2.00
wsec/s=9.06
avgrq-sz=17.95
avgqu-sz=0.00
await=4.21
svctm=1.75
%util=0.11
n
Unicode characters must be escaped.
Unicode characters in a script are decoded during script processing. For example, the string %3D is
decoded to an equals sign (=). To preserve the value of s string that might be interpreted as a unicode
character, escape the string with a double backslash, for example: \\%3D.
Defining the Proxy Resources in the Plug-in Descriptor
If the plug-in manages a single process, model the monitored process as a platform service. Specify it in a
<service> element in the root <plugin> element of the descriptor.
Endpoint Operations Management Agent Plug-in Development Kit
12 VMware, Inc.