Plugin Development Center
This section describes how to build HQ plugins, the interface between Hyperic HQ and the managed product.
Table of Contents
- Plugin Overview
- SIGAR
- PTQL
- Plugin Examples
- Protocol Monitor Plugin
- Process Monitor Plugin
- Script Plugin
- qmail Plugin (combines Protocol, Process and Script)
- SQL Query Plugin
- SNMP Plugin
- Windows Plugin
- JMX Plugin
- JBoss Custom MBean Plugin
Plugin Overview
Hyperic HQ plugins are self-contained .jar or .xml files which are deployed on the server-side and agent-side. Plugins are not aware of server vs. agent side deployment. However, the plugins are used differently by the server and agent. On the server-side, plugin metadata is extracted for the following:
- Platform, Server and Service resource types
- Config Schema for each resource type
- Measurements
- Optional help text to enable product-specific instrumentation
- Control actions
On the agent-side, plugin implementations are invoked for the following:
- Measurement
- Control
- Auto Inventory
- Response Time
All of this information is described in the Plugin XML Descriptor, which is either a standalone .xml file or embedded in the .jar file.
There are 4 plugin implementations:
Plugin Deployment
Bundled plugins are deployed to both the server and agent in the following locations:
server-3.0.x/hq-engine/server/default/deploy/hq.ear/hq-plugins/
agent-3.0.x/pdk/plugins/
The server supports hot-deployment, plugins can be updated or added without restarting the server.
The agent does not support hot-deployment, it must be restarted when updating or adding a plugin.
Custom plugins can be added in the directories listed above or to a subdirectory 'hq-plugins' within the parent directory.
For example, if the server is installed at:
/usr/local/hyperic/server-3.0.x/
Add your custom plugins to:
/usr/local/hyperic/hq-plugins/
| hq-plugins/ must exist prior to starting the server Hot-deployment on the server side using the custom hq-plugins/ directory requires that this directory exists prior to starting the server. |
If the agent is installed at:
/usr/local/hyperic/agent-3.0.x/
Add your custom plugins to:
/usr/local/hyperic/hq-plugins/
Similar on Windows, if the server is installed at:
C:\Program Files\Hyperic HQ\server-3.0.x\
Add your custom plugins to:
C:\Program Files\Hyperic HQ\hq-plugins\
If the agent is installed at:
C:\Program Files\Hyperic HQ\agent-3.0.x\
Add your custom plugins to:
C:\Program Files\Hyperic HQ\hq-plugins\
Using this approach, there is no need to copy custom plugins each time the server or agent is upgraded to a new version.
Invoking Plugins Outside the Server or Agent
When developing plugins, it's helpful to be able to invoke plugin methods directly for quick testing. The Invoking Plugins Standalone document describes this process.