CustomPollerDisco
The Oracle Communications Unified Assurance Metric Custom Poller Discovery application uses rules to create metrics that will be polled from a device. This is accomplished by using the instance information that was previously gathered by other applications and entered into the Oracle Communications Unified Assurance database.
For example, the default job and rules configuration will create the base metric entries for the following:
-
Interface Inbound and Outbound Bandwidth, Errors and Discards metrics can be created depending on the Device Type and Instance Name. There are rules for the Device Types of Server, Switch and Router that are provided by default, and each Device Type has separate set of Instance Name requirements that are needed for metric creation to occur. Other Device Types will not be processed.
-
Response Time metrics can be created depending on the Device Type and Instance Name. There are rules for the Device Types of Switch and Router that are provided by default, and both of those Device Types have separate sets of Instance Name requirements that are needed for metric creation to occur. All instances for the Device Type of Server will be processed. Other Device Types will not be processed.
-
Ping Polling metrics can be created for all devices. There are no limitations done on Device Type in these rules, and the metrics will only be created on the Device instance, which is created by default for all devices.
You can run this application as a scheduled job using the Jobs UI.
Custom Poller Discovery Agent Setup
-
Devices must exist in the Device Catalog for this application to be able to function. Devices can be created in several different ways:
-
Using the Device Auto Discovery application.
-
Using the Manual Discovery UI.
See Manual Discovery in Unified Assurance User's Guide for information about this UI.
-
Manually entering all values using the Devices UI:
See Devices in Unified Assurance User's Guide for information about this UI.
-
-
(Optional) The bandwidth metric creation functionality requires that instances have been discovered using the Metric SNMP Network Interface Discovery Agent job (which uses the Metric SNMP Network Interface Discovery Agent application), or by another method.
-
(Optional) The response time metric creation functionality requires that instances have been discovered using the Metric NMAP TCP Port Discovery job (which uses the Metric Pipe Instance Discovery application), or by another method.
-
Review the logic in the rules files referenced in the configuration to see the processing that will be done on the devices 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. In a default configuration, there are several rules files that are included so they can be called from the BaseRules.
-
BaseRules will be run for each device that is selected based on the configuration.
Update the logic as needed.
-
-
Enable the default Metric Custom Poller Discovery job or create a custom one.
The default job configuration is to run every Sunday at 12:59:00am.
See Jobs in Unified Assurance User's Guide for information about the UI for creating and enabling jobs.
Default Scheduled Job
The following table shows the settings for the default Metric Custom Poller Discovery job. Actual values are in bold, descriptions of values are in plaintext.
Field | Value |
---|---|
Package | coreCollection-app |
Name | Metric Custom Poller Discovery |
Program | bin/core/collection/CustomPollerDisco |
Arguments | This field is blank. There is no default value. |
Description | Rules-based Polling configuration agent |
Failover Type | Standalone (Supported: Standalone, Primary, Redundant/Backup) |
Status | Disabled |
Privileged | This option is not selected. |
Minutes | 59 |
Hours | 0 |
Days | * |
Months | * |
WeekDays | 0 |
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 settings for the default Metric Custom Poller Discovery job. Actual values are in bold, descriptions of values are in plaintext.
Name | Value | Possible Values | Notes |
---|---|---|---|
BaseRules | collection/metric/pollerdisco/custom/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. |
DeviceZoneID | Default First Zone | All Zones or the name of any available device zone. | This entry is used to get a more specific list of devices to run the discovery agent against. |
IncludeRules | collection/metric/pollerdisco/custom/base.includes | Text, 255 characters | The relative path to the application Include Rules file. |
LoadRules | collection/metric/pollerdisco/custom/base.load | Text, 255 characters | The relative path to the application Load Rules file. |
LogFile | logs/MetricPollerDiscovery.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. |
About Metric Custom Poller Discovery Rules
This application uses the Unified Assurance standard rules architecture in Perl syntax. For information about creating rules, see the following in Unified Assurance Developer's Guide:
-
Core for information about core rules functions.
-
Metrics for information about metric rules functions.
About Metric Custom Poller Discovery Tokens
This application exposes the following tokens for rules processing.
Token | Description |
---|---|
$Instance->{CustomName} | The Metric Instance Custom Name for the device being processed. |
$Instance->{DeviceID} | The Assure1 Device ID for the device being processed. |
$Instance->{DevicePriorityID} | The Priority value for the device being processed. |
$Instance->{DeviceStateID} | The State for the device being processed. |
$Instance->{DeviceTypeCategoryID} | The Device Type Category ID for the device being processed. |
$Instance->{DeviceTypeCategoryName} | The Device Type Category Name for the device being processed. |
$Instance->{DeviceTypeName} | The Device Type Name for the device being processed. |
$Instance->{DeviceTypeVendorID} | The Device Type Vendor ID for the device being processed. |
$Instance->{DeviceTypeVendorName} | The Device Type Vendor Name for the device being processed. |
$Instance->{DNSName} | The DNS Name for the device being processed. |
$Instance->{InstanceID} | The Metric Instance ID for the instance being processed. |
$Instance->{InstanceName} | The Metric Instance Name for the instance being processed. |
$Instance->{IPv4} | The IP v4 for the device being processed. |
$Instance->{IPv6} | The IP v6 for the device being processed. |
$Instance->{SysName} | The System Name for the device being processed. |
$Instance->{SysObjectID} | The System Object ID for the device being processed. |
$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({}); |
Example Metric Custom Poller Discovery Enhancement
While the metrics are being created in the rules, various thresholds can also be added to the metrics automatically. Information regarding the default Thresholds that come with Unified Assurance is available via the Thresholds UI. See Thresholds in Unified Assurance User's Guide for information about this UI.
Here is a snippet of the original code from the ping.include.rules that creates a latency metric:
($Error, $Message, $MetricID) = FindMetricID({
DBH => \$Assure1DBH,
StorageHash => $MetricHash,
DeviceID => $Instance->{'DeviceID'},
InstanceID => $Instance->{'InstanceID'},
MetricTypeID => 60,
Factor => 1,
Max => 0,
PollInterval => $PollInterval,
Create => 1
});
UpdateMethodOnMetric({
DBH => \$Assure1DBH,
MetricID => $MetricID,
MethodID => 0
});
Here is the code that can be used after the code segment to add the thresholds:
# Adds the "Device Down" threshold
($ErrorFlag, $Message) = AddThresholdToMetric({
DBH => \$Assure1DBH,
MetricID => $MetricID,
ThresholdID => 1
});
# Adds the "Latency High" threshold
($ErrorFlag, $Message) = AddThresholdToMetric({
DBH => \$Assure1DBH,
MetricID => $MetricID,
ThresholdID => 3
});
Administration Details
The following list shows the technical details you will need for advanced administration of the application:
-
Package: coreCollection-app
-
Synopsis:
./CustomPollerDisco [OPTIONS]
-
Options:
-c, --AppConfigID N Application Config ID (Service, Job, or Request ID) -d, --DeviceID N DeviceID (Optional) -?, -h, --Help Print usage and exit
-
Threaded: - Single Threaded