GenericDatabaseStitcher
The Oracle Communications Unified Assurance Topology Database Stitcher is used to create device relationships in the graph database. It connects to the database configured, runs the specified queries and makes the results available to rules files for special processing and entry into the graph database.
You can run this application as a scheduled job using the Jobs UI. The following default jobs use this application to create graph relationships:
-
Topology Database Stitcher
-
Topology Perspective Stitcher
Database Stitcher Setup
-
Review the query in the SelectSQLFile file referenced in the configuration to see the data that will be selected for processing. Update the query as needed.
-
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.
Update the logic as needed.
-
-
Enable the default Service, unless a specific configuration option is needed:
Default Scheduled Job
The following table shows the settings for the default jobs: Topology Database Stitcher and Topology Perspective Stitcher. Actual values are in bold, descriptions of values are in plaintext
Field | Value |
---|---|
Package | coreCollection-app |
Name | Topology Database Stitcher or Topology Perspective Stitcher |
Program | bin/core/collection/GenericDatabaseStitcher |
Arguments | This field is blank. There is no default value. |
Description |
|
Failover Type | Standalone (Supported: Standalone, Primary, Redundant/Backup) |
Status | Disabled |
Privileged | This option is selected. |
Minutes | 0 |
Hours | 20 for the Topology Database Stitcher job or 21 for the Topology Perspective Stitcher job |
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 | Value | Possible Values | Notes |
---|---|---|---|
BaseRules |
|
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 |
|
Text, 255 characters | The relative path to the application Include Rules file. |
LoadRules |
|
Text, 255 characters | The relative path to the application Load Rules file. |
LogFile |
|
Text, 255 characters | The relative path to the log file. |
LogLevel | ERROR | OFF, FATAL, ERROR, WARN, INFO, DEBUG | The logging level for the application. |
SourceSchemaName | Assure1 | Text, 255 characters | Database Schema name matching an entry in the Databases configuration; Connects and supports failover as per that configuration. Cannot be used in conjunction with DatabaseID. |
DatabaseID | This field is blank. There is no default value. | Text, 255 characters | (Optional) Specific Database entry in the Databases configuration. Connects but does not support failover. Cannot be used in conjunction with SourceSchemaName |
DeviceID | This field is blank. There is no default value. | An integer | (Optional) Used by the Perspective Stitcher to create perspective links. This should be the starting Root node of the perspective. If not given, defaults to local server device |
DSN | This field is blank. There is no default value. | Text, 255 characters | (Optional) (DEPRECATED: Use SourceSchemaName or DatabaseID instead). The database connection information and driver. |
EdgeTypeID | This field is blank. There is no default value. | An integer | (Optional) Used by the Perspective Stitcher to create directed perspective links. Should be either HasPrimaryPerspective, HasSecondaryPerspective or a custom directed link type. |
Password | This field is blank. There is no default value. | Text, 255 characters | (Optional) (DEPRECATED: This is not encrypted. Use the Database configuration password instead.) The database login password. |
SelectSQLFile |
|
Text, 255 characters | (Optional) The relative path to the SQL file containing the database query. If not given, will directly runs Base Rules without a data set. |
Username | This field is blank. There is no default value. | Text, 255 characters | (Optional) (DEPRECATED: Use the Database configuration username instead.) The database login username. |
Best Practice
- The default job is configured to run at 8:00 pm every day, but the default perspective stitcher is configured to run at 9:00 pm every day.
Rules
This stitcher 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 stitcher exposes the following tokens for use in 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'.) |
$DataRow | Resulting data from query. Use $DataRow->{'FieldName'} to access the FieldName data. Empty if SelectSQLFile application configuration is blank. |
$Count | Current row of the returned dataset. Value is 0 if SelectSQLFile application configuration is blank. |
$CustomHash | Custom key, value cache available across all rules. Contents commonly defined in Load Rules then used in Base or other rules. |
$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:
-
Package: coreCollection-app
-
Package:
./GenericDatabaseStitcher [OPTIONS]
-
Options:
-c, --AppConfigID N Application Config ID (Service, Job, or Request ID) -?, -h, --Help Print usage and exit
-
Threaded: Single Threaded