Hyperic HQ Plugin API v. 2.5.dev

## net.hyperic.hq.product
Class SigarMeasurementPlugin

    java.lang.Object
      net.hyperic.hq.product.GenericPlugin
          net.hyperic.hq.product.MeasurementPlugin
              net.hyperic.hq.product.SigarMeasurementPlugin

Direct Known Subclasses:
  JDBCMeasurementPlugin, Win32MeasurementPlugin

public abstract class SigarMeasurementPlugin
extends MeasurementPlugin

Field Summary
`protected MeasurementPluginManager` `manager`
`static java.lang.String` `PTQL_CONFIG`
`static java.lang.String` `PTQL_DOMAIN`
`protected static java.lang.Double` `VALUE_NOTIMPL`

Fields inherited from class net.hyperic.hq.product.MeasurementPlugin
`PROP_TEMPLATE_CONFIG`

Fields inherited from class net.hyperic.hq.product.GenericPlugin
`config, FILE_DELIM, FILE_DELIM_ESC, PROP_NAME`

Constructor Summary
`SigarMeasurementPlugin()`

Method Summary
`protected net.hyperic.sigar.Sigar` `getSigar()`
`MetricValue` `getValue(Metric metric)` This method is called when the plugin is asked for a metric value.
`void` `init(PluginManager manager)` Called when the plugin is loaded on the server and on the agent side.
`void` `shutdown()` Called when the server or agent is shutdown.
`java.lang.String` `translate(java.lang.String template, ConfigResponse config)` Translate a measurement as returned from getMeasurements() into a value which can be passed into the plugin's getValue() routine.

Methods inherited from class net.hyperic.hq.product.MeasurementPlugin
`getConfigSchema, getHelp, getManager, getMeasurementProperties, getMeasurements, getPlatformHelpProperties, getPluginXMLHelp`

Methods inherited from class net.hyperic.hq.product.GenericPlugin

`configure, getAbsoluteFiles, getConfig, getConfig, getCustomPropertiesSchema, getCustomPropertiesSchema, getCustomPropertiesSchema, getDefaultInstallPath, getLog, getLogName, getName, getPlatformName, getPluginClassName, getProductPlugin, getProperties, getProperty, getTypeInfo, getTypeNameProperty, getTypeNameProperty, getTypeProperty, getTypeProperty, getTypeProperty, isWin32, openResource, setName, setTypeInfo, toFileList`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### VALUE_NOTIMPL

    protected static final java.lang.Double VALUE_NOTIMPL

### PTQL_DOMAIN

    public static final java.lang.String PTQL_DOMAIN

See Also:
  Constant Field Values

### PTQL_CONFIG

    public static final java.lang.String PTQL_CONFIG

See Also:
  Constant Field Values

### manager

    protected MeasurementPluginManager manager

Constructor Detail

### SigarMeasurementPlugin

    public SigarMeasurementPlugin()

Method Detail

### init

    public void init(PluginManager manager)
              throws PluginException

  Description copied from class: `GenericPlugin`
  Called when the plugin is loaded on the server and on the agent side.

  Overrides:
    `init` in class `MeasurementPlugin`
  Throws:
    `PluginException`

### getSigar

    protected net.hyperic.sigar.Sigar getSigar()
                                        throws PluginException

  Throws:
    `PluginException`

### shutdown

    public void shutdown()
                  throws PluginException

  Description copied from class: `GenericPlugin`
  Called when the server or agent is shutdown. Use this method to cleanup any resources that were created during the init() method.

  Overrides:
    `shutdown` in class `GenericPlugin`
  Throws:
    `PluginException`

### translate

    public java.lang.String translate(java.lang.String template,
                                      ConfigResponse config)

  Description copied from class: `MeasurementPlugin`
  Translate a measurement as returned from getMeasurements() into a value which can be passed into the plugin's getValue() routine.

  Overrides:
    `translate` in class `MeasurementPlugin`
  Parameters:
    `template` - Measurement template from one of the plugins measurements returned from getMeasurements()
    `config` - Configuration used to perform translation on the template

### getValue

    public MetricValue getValue(Metric metric)
                         throws PluginException,
                                MetricNotFoundException,
                                MetricUnreachableException

  Description copied from class: `MeasurementPlugin`
  This method is called when the plugin is asked for a metric value. The Metric is a translated value as returned by the getMeasurements() routine, and then run through the translate() method.

  Specified by:
    `getValue` in class `MeasurementPlugin`
  Parameters:
    `metric` - Value returned from translate(), representing a specific metric to retrieve
  Returns:
    The value of the Metric and timestamp of collection time
  Throws:
    `PluginException` - Thrown when an internal plugin error occurs
    `MetricUnreachableException` - The monitored resource is unreachable. I.e. ConnectException
    `MetricNotFoundException` - The monitored resource does not know about the requested Metric. I.e. JMX AttributeNotFoundException

Hyperic HQ Plugin API v. 2.5.dev

Copyright © 2004-2005 Hyperic LLC support@hyperic.net, All Rights Reserved.