JS Generic Event Processor
Overview
The Unified Assurance JavaScript Generic Event Processor microservice is part of the microservice event pipeline. The microservice is responsible for enrichment/processing of custom JavaScript rules-based events and for forwarding them down the event pipeline to a selected target (preferably an event-sink).
Prerequisites
-
A microservices cluster must be setup. Refer to Microservice Cluster Setup.
-
Apache Pulsar must be installed. Refer to Apache Pulsar microservice.
Setup
su - assure1
export NAMESPACE=a1-zone1-pri
export WEBFQDN=<Primary Presentation Web FQDN>
a1helm install js-generic-event-processor assure1/js-generic-event-processor -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
Default Configuration
Name | Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
STREAM_INPUT Not configurable yet | persistent://assure1/event/js-generic-processor | Text, 255 characters | Apache Pulsar topic path. Topic at end of path may be any text value. |
STREAM_OUTPUT Not configurable yet | persistent://assure1/event/sink | Text, 255 characters | Not configurable at this time |
PRODUCTION_ENV | true | true,false | If true, application WILL NOT display any console.log statements from js rules. |
STRICT_COMPILE | true | true,false | If true, application will force javascript strict compilation rules. |
RULES_LOCATION | /core/default/processing/event/js-generic-event-processor | Text, 255 characters | Default SVN location (within Unified Assurance) for base.rule.js rules processing file. |
Configurations can be changed by passing the values to the a1helm install
prefixed with the configData parent key.
Example of setting the log level to DEBUG
a1helm install ... --set configData.LOG_LEVEL=DEBUG
Autoscaling
For microservice scaling options, please refer to the autoscaling docs.
On top of the standard autoscaling options, this microservice supports the following additional configurations:
Name | Value | Possible Values | Notes |
---|---|---|---|
thresholds.backlogSize | 1000 | Integer | The number of items that need to be in the backlog before the auto-scaling 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. |
Example of changing the auto-scaling value
To change the thresholds used for this functionality, pass the following to the installation command:
a1helm install ... --set autoscaling.thresholds.backlogSize=2000
Microservice self-metrics
The Unified Assurance JavaScript Generic Event Processor microservice exposes the following self-metrics to Prometheus.
Metric Name | Type | Description |
---|---|---|
total_events_processed | Counter | Number of events processed by js-generic-processor |
processing_time_per_event | Gauge | Processing time per events by js-generic-processor |
js_generic_event_processor_backlog_size | Gauge | Number of items pending in the backlog |