GenericAgent

The Oracle Communications Unified Assurance Event Generic Agent is a generic events processing engine that allows you to create custom event enrichment actions via rules. The agent polls the Events database using a custom SQL statement, parsing the results with the customized rules and creating or modifying events within Unified Assurance.

It can alternatively poll the historical database, processing the results with customized rules; it does allow events to be modified, but there is no general guarantee that the EventID from the Historical database is still present in the current Event database.

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

Generic Agent Setup

  1. Review the query in the SelectSQLFile file referenced in the configuration to see the events that will be selected for processing. Update the query as needed.

  2. Review the logic in the rules files referenced in the configuration to see the processing that will be done on the events that are selected:

    • LoadRules will be run during application startup to load data that might be needed during processing.

    • IncludeRules will be read during application startup to load additional files that might be called during processing.

    • BaseRules will be run for each event that is selected from the query.

    • PostRules will be run after all events have been processed.

    Update the logic as needed.

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

    Configuration -> Broker Control -> Jobs

Using the Historical Database

  1. Make sure that the query in the SelectSQLFile file is appropriate for reading from the Observability Analytics eventanalytics indices. The query uses the OpenSearch SQL plugin. See SQL in the OpenSearch documentation for more information.

    The query will likely be of the form:

    SELECT <fields> FROM eventanalytics-* WHERE <conditions> AND LastReported > DATE_ADD(NOW(), INTERVAL - 3 DAY)

  2. (Optional) Clone the default job, and change the configuration of the clone.

  3. Add the SourceSchemaName configuration option and set its value to Historical.

  4. Run the job on an appropriate schedule.

    Note:

    Every minute is unlikely to be an appropriate schedule for querying the Historical database.

  5. Optionally, add the MaxBatchSize configuration option and set it to specify a different value for the fetch_size in the OpenSearch query. The default fetch size is 1000.

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 coreCollection-app
Name Event Generic Agent
Program bin/core/collection/GenericAgent
Arguments This field is blank. There is no default value.
Description Event Polling for Event Correlation
Failover Type Standalone (Supported: Standalone, Primary, Redundant/Backup)
Status Disabled
Privileged This option is selected.
Minutes *
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
BaseRules collection/event/agent/base.rules Text, 255 characters The relative path to the application Base Rules file.
BranchDir core/default Text, 255 characters The relative path to the rules directory.
IncludeRules collection/event/agent/base.includes Text, 255 characters The relative path to the application Include Rules file.
LoadRules collection/event/agent/base.load Text, 255 characters The relative path to the application Load Rules file.
LogFile logs/EventGenericAgent.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.
PostRules collection/event/agent/base.post Text, 255 characters Relative path to Post Rules.
SelectSQLFile collection/event/agent/events.sql Text, 255 characters The relative path to the SQL file containing the database query.
ShardID 1 An integer Database shard to be used.

Best Practices

Rules

This agent uses the Unified Assurance standard rules architecture in Perl syntax. For information about creating rules, see the following in Unified Assurance Developer's Guide:

Tokens

The agent exposes the following tokens for rules 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'.)
$EventRow Resulting data from query. Use $EventRow->{'FieldName'} to access the FieldName data.

Administration Details

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