MetricPostCalculator

The Oracle Communications Unified Assurance Metric Post-Collection Calculation Engine (PCCE) creates calculated metrics from data that is already in the Unified Assurance database. The PCCE retrieves a set of metric values from the database, runs the results through a customizable script which can then be used to create or update a meta-metric for a device. A meta-metric is a metric calculated from the values of other metrics.

For example, if running an ESXI Virtual Server with multiple Virtual Machines, Unified Assurance can be configured to create a meta-metric of CPU utilization from all of the Virtual Machines, then save the value for the host Virtual Server.

You can run this application as a scheduled job using the Jobs UI.

PCCE Setup

To use this functionality, Unified Assurance must already contain the Metrics that are to be calculated.

  1. Create a Collection of the metrics to be retrieved and calculated:

    Configuration -> Metrics -> Collections

  2. Create the Calculation that Unified Assurance will run against the collection. The policy can add the different values available, calculate averages, etc.

    Configuration -> Metrics -> Calculations

  3. Enable the default Job, unless a specific configuration option is needed.

    Configuration -> Broker Control -> Jobs

Default Scheduled Job

The following table shows the settings for the default job. Actual values are in bold, descriptions of values are in plaintext.

Field Value
Package coreProcessing-app
Name Metric Post-Collection Calculation Engine (PCCE)
Program bin/core/processing/MetricPostCalculator
Arguments This field is blank. There is no default value.
Description Calculate metrics with pre-defined formulas using data previously collected
Failover Type Standalone (Supported: Standalone, Primary, Redundant/Backup)
Status Disabled
Privileged This option is selected.
Minutes 0,5,10,15,20,25,30,35,40,45,50,55
Hours *
Days *
Months *
WeekDays *

See Jobs in Unified Assurance User's Guide for general information about the settings for jobs.

See Using Application Primary/Backup Failover for more information about the different failover types.

Default Configuration

The following table shows the default configurations for the application. Actual values are in bold, descriptions of values are in plaintext.

Name Default Value Possible Values Notes
LogFile logs/MetricPostCalculator.log Text, 255 characters The relative path to the log file.
LogLevel ERROR OFF, FATAL, ERROR, WARN, INFO, DEBUG The logging level for the application.
Threads 3 An integer The number of process threads created.
DBThreads This field is blank. There is no default value. An integer (Optional) Number of database threads to be created. If not specified, defaults to Threads application configuration.
ThresholdThreads This field is blank. There is no default value. An integer (Optional) Number of threshold threads to be created. Enables the checking of thresholds in the application instead of the Standard Thresholding Engine. If not specified, application threshold checking is disabled.

Best Practice

The following list shows you the best practices for working with this application:

Calculation Code

The Calculation Code is the Perl-based logic that processes the results from the Metric Collection polling. For information about creating calculation code rules, see the following in Unified Assurance Developer's Guide:

Tokens

The PCCE exposes tokens during processing as shown in the following table.

Token Description
$Data->{Metrics}->{$MetricID}->{DeviceID} The device ID that the metric came from.
$Data->{Metrics}->{$MetricID}->{Factor} The amount to factor when displaying the metric data.
$Data->{Metrics}->{$MetricID}->{InstanceID} This refers to the specific instance ID for the metric.
$Data->{Metrics}->{$MetricID}->{Maximum} This will have the configured maximum value of the metric.
$Data->{Metrics}->{$MetricID}->{MethodID} This will have the configured method ID of the metric.
$Data->{Metrics}->{$MetricID}->{MetricTypeID} This will have the configured metric type ID of the metric.
$Data->{Metrics}->{$MetricID}->{PollTime} How often the metric is polled in seconds.
$Data->{Metrics}->{$MetricID}->{State} Whether or not the last poll was successful. 0 = failed to poll.
$Data->{Metrics}->{$MetricID}->{Time} The time the metric data was polled.
$Data->{Metrics}->{$MetricID}->{Value} The actual value of the metric.
$AppConfig Hash reference to the application configuration name-value pairs that were configured. (i.e. use $AppConfig->{'Host'} to retrieve the set value for 'Host'.)
$CustomHash Custom key, value cache available across all rules. Contents commonly defined in Load Rules then used in Base or other rules. NOTE: This variable is a shared object and any additional sub hashes or arrays must be shared before use or it will cause the error: Invalid value for shared scalar. Instantiate the sub hash/array using '&share({})' e.g.
$CustomHash->{SubObject} = &share({});
$StorageHash Internal cache used as the StorageHash option when calling rules functions such as FindDeviceID(). NOTE: The structure of this cache is subject to change! Not recommended for custom global storage or manual manipulation; use $CustomHash.

Administration Details

The following list shows the technical details you will need for advanced administration of the application: