DX Application Performance Management

Functions 

Aug 16, 2013 10:31 PM

getAgentRegex

Returns a string containing a regular expression to match agents

function getAgentRegex() 
{
    return ".*";
}


getMetricRegex

Returns a string containing a regular expression to match metrics

function getMetricRegex() 
{
    return "CPU.*";
}


getFrequency

Must return a multiple of default system frequency (currently 15 seconds)

function getFrequency() 
{
     return 15;
}


getMetricSpecifier

Returns a metric Specifier

function  getMetricSpecifier()
{
     return "CPU\|.*";
}


execute

Each calculator must have an execute() function that takes two arguments. Additionally, helper functions are available to help build metrics to send back to the Enterprise Manager. The syntax is:

function execute(metricData,javascriptResultSetHelper) where

  • metricData—is an array of metric Data supplied to the function when it is called at every 15 seconds before execute() intervals
  • javascriptResultSetHelper—is an object that collects the new metric data produced by the script and sends them back to the EM
    • kDefaultFrequency - is used as input to the frequency argument of the addMetric() helper function
    • kIntegerConstant - maps to the integer constant metric type
    • kIntegerFluctuatingCounter - maps to the integer fluctuating counter metric type
    • kLongConstant - maps to the long constant metric type
    • kLongFluctuatingCounter - maps to the long fluctuating counter metric type
    • kLongTimestamp - maps to the long timestamp metric type
    • kLongTimestampConstant - maps to the long timestamp constant metric type
    • kIntegerPercentage - maps to the integer percent metric type
    • kIntegerDuration - maps to the integer duration metric type
    • kLongDuration - maps to the long duration metric type
    • kLongIntervalCounter - maps to the long interval counter metric type
    • kStringIndividualEvents - maps to the string metric type
    • addMetric(metricName, count, value, min, max, metricType, frequency) - supports setting the count/value/min/max of a metric value, which is needed for the rate and interval count metric types, where the "value" of the metric is based on its "count"
    • getCustomMetricAgentMetric(agentMetric) - helps build a fully qualified metric name using the agent metric supplied and filling in the rest based on the name of the SuperDomain custom metric agent
      The execute() function is called every 15 seconds by the scripting engine.

Statistics
0 Favorited
4 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.