com.dynatrace.diagnostics.pdk
Interface MonitorEnvironment

All Superinterfaces:
PluginEnvironment

public interface MonitorEnvironment
extends PluginEnvironment

The environment for Monitor Plugins.

This environment extends the Plugin environment by methods to retrieve subscribed measures.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.dynatrace.diagnostics.pdk.PluginEnvironment
PluginEnvironment.Host
 
Method Summary
 MonitorMeasure createDynamicMeasure(MonitorMeasure monitorMeasure, java.lang.String dynamicKey, java.lang.String dynamicValue)
          Creates a dynamic measure with a single dynamic dimension from a subscribed measure.
 java.util.Collection<MonitorMeasure> getMonitorMeasures()
          Returns all subscribed measures for this monitor.
 java.util.Collection<MonitorMeasure> getMonitorMeasures(java.lang.String metricGroupName, java.lang.String metricName)
          Returns all subscribed measures for the given metric.
 
Methods inherited from interface com.dynatrace.diagnostics.pdk.PluginEnvironment
getConfigBoolean, getConfigDate, getConfigDouble, getConfigFile, getConfigLong, getConfigPassword, getConfigString, getConfigUrl, getHost, isStopped
 

Method Detail

getMonitorMeasures

java.util.Collection<MonitorMeasure> getMonitorMeasures(java.lang.String metricGroupName,
                                                        java.lang.String metricName)
Returns all subscribed measures for the given metric. These are the measures which are configured for this monitor schedule. To return measures from the monitor the MonitorMeasures in the returned collection have to be updated with the values to return.

Parameters:
metricGroupName - the name of the metric group
metricName - the name of the metric in the group
Returns:
a Collection of MonitorMeasures or null if the parameters are invalid

getMonitorMeasures

java.util.Collection<MonitorMeasure> getMonitorMeasures()
Returns all subscribed measures for this monitor.

Returns:
a Collection of MonitorMeasures

createDynamicMeasure

MonitorMeasure createDynamicMeasure(MonitorMeasure monitorMeasure,
                                    java.lang.String dynamicKey,
                                    java.lang.String dynamicValue)
Creates a dynamic measure with a single dynamic dimension from a subscribed measure.

Parameters:
monitorMeasure - a currently subscribed measure. This must be an object which is contained in the set which is returned by getMonitorMeasures()
dynamicKey - the dynamic dimension for dynamic measure has. This key will be displayed as-is in charts and usable for dynamic splitting of charts. Example: Message Queue
dynamicValue - the value of the provided dynamic dimension. Every unique value will generate a unique measure in a chart. Example: MyQueueName
Returns:
a new measure which has to be filled with a measurement value, see MonitorMeasure


Copyright © 2004-2012 dynaTrace software GmbH