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
This method returns a list of registry keys to scan. The ServerDetector class
contains default implementation for this function, which requests keys from
the plug-in descriptor file. The example XML content that is used in this
document results in the single list member SOFTWARE\Microsoft\Internet
Explorer.
A user can implement/overwrite this method to return a list of keys directly.
Returns: A list of registry keys.
Example: Usage
package hq.example;
import java.util.ArrayList;
import java.util.List;
import org.hyperic.hq.product.PluginException;
import org.hyperic.hq.product.RegistryServerDetector;
import org.hyperic.hq.product.ServerDetector;
import org.hyperic.hq.product.ServerResource;
import org.hyperic.sigar.win32.RegistryKey;
import org.hyperic.util.config.ConfigResponse;
public class CustomRegistryScanDetector
extends ServerDetector
implements RegistryServerDetector {
/** Base PTQL query to find matching processes by full path */
private static final String PTQL_QUERY = "State.Name.eq=iexplore";
public List getServerResources(ConfigResponse platformConfig, String path, RegistryKey
current)
throws PluginException {
List servers = new ArrayList();
ConfigResponse productConfig = new ConfigResponse();
productConfig.setValue("process.query", PTQL_QUERY);
ServerResource server = createServerResource(path);
setProductConfig(server, productConfig);
server.setMeasurementConfig();
servers.add(server);
return servers;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<plugin
name="registryscan-example"
package="hq.training">
<metrics
Chapter 4 Plug-In Support Classes
VMware, Inc. 59