CustomPolicyEngined

The Oracle Communications Unified Assurance Event Custom Action Policy Engine (CAPE) is a policy-based, multithreaded, multi-headed, and flexible correlation engine. You can configure it to run a variety of custom tasks on the event stream before other actions are taken. CAPE allows for post-collection processing for enrichment and correlation outside of the database environment. You can use a variety of connectors (Generic Connector, Ticketing Connectors, Probable Root Cause Analysis), agents (time of day correlation, time of day, existence or absence of events) and internal or external datasets to create custom correlation models. Use CAPE to integrate Unified Assurance with an external ticketing system, enrich and correlate data, implement custom notifications, and perform automatic remediation.

A CAPE implementation consists of two pieces:

You can run this application as a service using the Services UI.

Custom Action Policy Engine (CAPE) Setup

  1. Create CAPE nodes or modify existing CAPE nodes.

    See Nodes in Unified Assurance User's Guide for information about the UI for creating and modifying CAPE nodes.

  2. Create CAPE policies or modify existing CAPE policies.

    See Policies in Unified Assurance User's Guide for information about the UI for creating and modifying CAPE policies.

  3. Create a custom CAPE service or enable the default CAPE service.

    See Services in Unified Assurance User's Guide for information about the UI for creating and enabling services.

For detailed examples of creating CAPE policies and corresponding nodes, see Configuring Custom Actions with CAPE Policies.

Default Service

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

Field Value
Package coreProcessing-app
Name Event Custom Action Policy Engine (CAPE)
Program bin/core/processing/CustomPolicyEngined
Arguments This field is blank. There is no default value.
Description Daemon runs custom policies which run custom nodes
Failover Type Standalone (Supported: Standalone, Primary, Redundant/Backup, Cluster)
Status Disabled
Privileged This option is selected.

See Services in Unified Assurance User's Guide for general information about the settings for services.

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

Default Configuration

The following table shows the additional default configuration settings for the CAPE service. Actual values are in bold, descriptions of values are in plaintext.

Name Default Value Possible Values Notes
CheckTime 900 An integer How often (in seconds) the application checks for new and removes old policies.
LogFile logs/EventCustomPolicyEngine.log Text, 255 characters The relative path to the CAPE log file.
LogLevel ERROR OFF, FATAL, ERROR, WARN, INFO, DEBUG The logging level for the application.
ShardID 1 An integer The Event database shard to use. Use 0 to read from all shards.
Threads 3 An integer The number of process threads created.
DeviceZoneID This field is blank. There is no default value. The name of any available device or CAPE zone. (Optional) The device zone or custom CAPE zone to run policies within. If not specified, All Zones is used.

About CAPE Node Rules

CAPE Nodes are written in Perl syntax. For information about creating nodes, see the following in Unified Assurance Developer's Guide:

About CAPE Tokens

CAPE exposes the tokens described in the following table for node processing.

Token Description
$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 nodes. Contents commonly defined in the first node of a policy and then used throughout the nodes. 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({});
$EventData Resulting data from Policy. Use $EventData->{'FieldName'} to access the FieldName data. When processing multiple events together, this is a hash of events keyed by the order it was returned from the query. Each row contains the reserved data field ShardID which is the ShardID it was read from.
$EventDBH Events Database Handle connected to configured shard. Usable by nodes to make updates, read additional information, etc. If ShardID is 0, this will be ShardID 1 only.
$StorageHash Internal cache used as the StorageHash option when calling 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: