Event Sink
The Event Sink microservice takes events that have been normalized and inserts them into the Event database.
This microservice is part of the Event microservice pipeline. See Understanding the Event Pipeline in Unified Assurance Concepts for conceptual information.
Autoscaling is enabled by default for this microservice. You can optionally disable autoscaling when you deploy the microservice. See Configuring Autoscaling.
This microservice provides additional Prometheus monitoring metrics. See Event Sink Self-Monitoring Metrics.
You can optionally enable this microservice to group database records into batches and insert the batches into the Event database. By enabling batching, you can improve system performance. Batching minimizes the backlog of events, which increases the throughput of processed events. You enable and configure batching when deploying the microservice. See Default Event Sink Configuration for details about batching parameters.
Event Sink Prerequisites
Before deploying the microservice, confirm that the following prerequisites are met:
-
A microservice cluster is set up. See Microservice Cluster Setup.
-
The Apache Pulsar microservice is deployed. See Pulsar.
Deploying Event Sink
To deploy the microservice, run the following commands:
su - assure1
export NAMESPACE=<namespace>
export WEBFQDN=<WebFQDN>
a1helm install <microservice-release-name> assure1/event-sink -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
In the commands:
-
<namespace> is the namespace where you are deploying the microservice. The default namespace is a1-zone1-pri, but you can change the zone number and, when deploying to a redundant cluster, change pri to sec.
-
<WebFQDN> is the fully-qualified domain name of the primary presentation server for the cluster.
-
<microservice-release-name> is the name to use for the microservice instance. Oracle recommends using the microservice name (event-sink) unless you are deploying multiple instances of the microservice to the same cluster.
You can also use the Unified Assurance UI to deploy microservices. See Deploying a Microservice by Using the UI for more information.
Changing Event Sink Configuration Parameters
When running the install command, you can optionally change default configuration parameter values by including them in the command with additional --set arguments. You can add as many additional --set arguments as you need.
For example:
-
Set a parameter described in Default Event Sink Configuration by adding --set configData.<parameter_name>=<parameter_value>. For example, --set configData.LOG_LEVEL=DEBUG.
-
Disable autoscaling for the microservice by adding --set autoscaling.enabled=false.
-
Set an autoscaling parameter described in Event Sink Autoscaling Configuration by adding --set autoscaling.<parameter_name>=<parameter_value>. For example, --set autoscaling.thresholds.backlogSize=2000.
Default Event Sink Configuration
The following table describes the default configuration parameters found in the Helm chart under configData for the microservice.
Name | Default Value | Possible Values | Notes |
---|---|---|---|
DATABASE_ONDUPKEY | Count = Count + 1, Duration = VALUES(LastReported) - FirstReported, EventCategory = VALUES(EventCategory), LastChanged = VALUES(LastChanged), LastReported = VALUES(LastReported), Severity = VALUES(Severity), Summary = VALUES(Summary) | Text, 32,720 characters | Any valid MySQL ON DUPLICATE KEY UPDATE clause. |
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
STREAM_INPUT | persistent://assure1/event/sink | Text, 255 characters | Apache Pulsar topic path. Topic at end of path may be any text value. |
STREAM_OUTPUT | mysql:///Event | Text, 255 characters | Cannot be changed. |
DB_BULK_INSERT_ENABLED | False | True, False | Whether batching of events is enabled (True) or not (False). |
DB_BULK_LIMIT | 100 | Integer | When DB_BULK_INSERT_ENABLED is set to True, the number of events that are included in a batch. |
DB_BULK_TIME | 2 | Integer | When DB_BULK_INSERT_ENABLED is set to True, after events stop coming in, the number of seconds the microservice waits before completing a batch. |
Event Sink Autoscaling Configuration
Autoscaling is supported for the Event Sink microservice. See Configuring Autoscaling for general information and details about the standard autoscaling configurations.
The Event Sink microservice also supports the additional configurations described in the following table.
Name | Default Value | Possible Values | Notes |
---|---|---|---|
thresholds.backlogSize | 1000 | Integer | The number of items that need to be in the backlog before the autoscaling starts additional processes. |
thresholds.totalEventsProcessed | 400 | Integer | Total events processed by the microservice. If the average of total events processed in five minutes exceeds the threshold, pods will be scaled. |
Event Sink Self-Monitoring Metrics
The Event Sink microservice exposes the self-monitoring metrics described in the following table to Prometheus.
Metric Name | Type | Description |
---|---|---|
total_events_processed | Counter | Number of events processed |
processing_time_per_event | Gauge | Processing time per event from receiving it to sending it to acknowledging it |
event_sink_backlog_size | Gauge | Number of items pending in the backlog |
Note:
Metric names in the database include a prefix that indicates the service that inserted them. The prefix is prom_ for metrics inserted by Prometheus. For example, total_events_processed is stored as prom_total_events_processed in the database.