Skip to content

Event Detector

Configuration reference for the service that detects violations and generates anomalies, including its hardware minimum.

7 min read Updated SS

Event Detector#

Introduction#

The Event Detector is a standalone microservice developed using the Spring framework, incorporating functionalities for SOR and Anomaly Processing within its module. It retrieves necessary configuration data directly from the Redis Cluster, utilizing specific hash names to access this configuration information.

To troubleshoot the Event Detector, see Event Detector Issues.

SOR Part of Event Detector#

The SOR component within the Event Detector processes the data received from the 'static-aggregated-kpi' queue. This data arrives in the AggregatedKpiProtos format. Upon receiving data, the SOR functionality applies a threshold breach check to identify any violations within the events.

Anomaly Part of Event Detector#

The Anomaly Detection component of the Event Detector microservice processes data from two primary sources:

1. The 'violated-events' queue and

2. Direct input in the ViolatedEventProtos format from the SOR part of the Event Detector.

The 'violated-events' queue is populated with inputs from the MLE (Machine Learning Engine) module, highlighting events that have breached predefined thresholds.

This component also receives data from the 'nor-thresholds' queue in ThresholdProtos format. It categorizes and filters this data based on event type, directing it to the appropriate Cassandra tables: 'kpis_thresholds' and 'transactions_thresholds'.

Moreover, raw violated event data is classified and stored in 'raw_kpis_violations', 'raw_transactions_violations', and 'raw_batchjob_violations' tables, again according to the event type.

The Anomaly Detection functionality implements persistence and suppression logic on the received violated events to generate anomaly events. These are then filtered as necessary and stored in 'kpis_anomalies', 'transactions_anomalies', 'anomalies', and 'anomalies_enrich_details' Cassandra tables, with the output formatted in AnomalyEventProtos.

Finally, this processed data is dispatched to 'anomaly-event-signal-messages' and 'anomaly-event-action-messages' queues for further action, ensuring comprehensive monitoring and responsive actions to detected anomalies.

Hardware Requirements for Event Detector#

The following minimum hardware requirements are recommended for running the Event detector service:

Memory: 3GB or more.

CPU: 2 cores or more.

Note: These are minimum requirements.
The actual hardware requirements may vary depending on the workload and usage of the Event detector service.

Consul Keys#

The Event Detector module utilizes a set of consul keys designed to facilitate its configuration and operation. These keys are essential for the module to function correctly and efficiently.

The consul keys are as follows:

service/rabbitmq/hostname
service/rabbitmq/port
service/rabbitmq/username
service/rabbitmq/password
service/rabbitmq/staticaggregatedkpiqueue
service/rabbitmq/violatedeventsqueue
service/rabbitmq/anomalysignalsqueue
service/rabbitmq/anomalyactionsqueue
service/rabbitmq/northresholdsqueue
service/rabbitmq/sslenable
service/rabbitmq/sslprotocol
service/cassandra/contactpoints
service/cassandra/port
service/cassandra/schema
service/cassandra/kpisanomaliesttl
service/cassandra/anomaliesenrichdetailsttl
service/cassandra/rawkpisviolationsttl
service/cassandra/rawtransactionsviolationsttl
service/cassandra/rawbatchjobviolationsttl
service/cassandra/anomaliesttl
service/cassandra/txnanomaliesttl
service/cassandra/kpithresholdsttl
service/redis/nodes
service/redis/sslenable
service/eventdetector/threadpoolcoresize
service/eventdetector/threadpoolmaxsize
service/eventdetector/signalseverityhigh
service/eventdetector/signalseveritylow
service/eventdetector/batchjobsuppressionvalue
service/eventdetector/batchjobcollectioninterval
service/eventdetector/outOfBoundValueinMins
service/eventdetector/health/metrics/updateinterval/milliseconds
service/eventdetector/management/endpoints/web/exposure/include
service/eventdetector/management/endpoints/jmx/exposure/include
service/eventdetector/management/endpoints/health/enabled
service/eventdetector/jmx/enabled
service/redis/eventdetector/maxidleconnections
service/redis/eventdetector/minidleconnections
service/redis/eventdetector/maxtotal connections
service/redis/eventdetector/connections/maxwaittimeinsec
service/rabbitmq/eventdetector/aggregatedKpi/prefetchCount
service/rabbitmq/eventdetector/aggregatedKpi/ackMode
service/rabbitmq/eventdetector/aggregatedKpi/consumerSize
service/rabbitmq/eventdetector/violatedEvent/prefetchCount
service/rabbitmq/eventdetector/violatedEvent/ackMode
service/rabbitmq/eventdetector/violatedEvent/consumerSize
service/rabbitmq/eventdetector/norThreshold/prefetchCount
service/rabbitmq/eventdetector/norThreshold/ackMode
service/rabbitmq/eventdetector/norThreshold/consumerSize
service/rabbitmq/eventdetector/thresholdForAggregatedKPIInSecs
service/rabbitmq/eventdetector/thresholdForViolatedEventInSecs
service/rabbitmq/eventdetector/thresholdForNorThresholdInSecs
service/eventdetector/loglevel
service/eventdetector/rootloglevel
service/eventdetector/auditlogs/maxfilesize
service/eventdetector/auditlogs/maxhistory
service/eventdetector/auditlogs/totalsizecap
service/eventdetector/logs/maxfilesize
service/eventdetector/logs/maxhistory
service/eventdetector/logs/totalsizecap
service/eventdetector/local/cache/timeout/minute
service/eventdetector/threadpoolqueuecapacity
service/eventdetector/delay/threshold/queue/max/size
service/eventdetector/opensearch/max/connection/per/route
service/eventdetector/opensearch/max/connection
service/eventdetector/opensearch/connection/timeout/millis
service/eventdetector/opensearch/socket/timeout/millis
service/rabbitmq/norclosedthresholdqueue   nor-closed-thresholds
service/rabbitmq/eventdetector/norClosedThreshold/prefetchCount 10
service/rabbitmq/eventdetector/norClosedThreshold/ackMode AUTO
service/rabbitmq/eventdetector/norClosedThreshold/consumerSize 1
service/rabbitmq/eventdetector/thresholdForNorClosedThresholdInSecs 4
service/eventdetector/opensearch/script/update true
service/eventdetector/closed/thresholds/duration/days 30
service/eventdetector/html/encoder/enable

If you change the log level through these Consul keys, restart the module. To change the log level without a restart, see Change a Service's Log Level at Runtime.

Health Metrics#

The health metrics of the Event Detector are critical indicators used to monitor and ensure the optimal performance and reliability of the system.

Metric Name Description
readCountAggregatedKpiQueue This is the number of incoming messages from the queue corresponding to 'service/rabbitmq/staticaggregatedkpiqueue' consul key. Initial value for this metric is 0.
readCountViolatedEventQueue This is the number of incoming messages from the queue corresponding to 'service/rabbitmq/violatedeventsqueue' consul key. Initial value for this metric is 0.
readCountNorThresholdQueue This is the number of incoming messages from the queue corresponding to 'service/rabbitmq/northresholdsqueue' consul key. Initial value for this metric is 0.
writeCountAnomalySignalQueue This is the number of outgoing messages to the queue corresponding to 'service/rabbitmq/anomalysignalsqueue' consul key. Initial value for this metric is 0.
writeCountAnomalyActionQueue This is the number of outgoing messages to the queue corresponding to 'service/rabbitmq/anomalyactionsqueue' consul key. Initial value for this metric is 0.
readAggregatedKpiQueueName This is the name of the input queue. This queue is same as value for 'service/rabbitmq/staticaggregatedkpiqueue' consul key. Initial value for this metric is 'static-aggregated-kpi'.
readViolatedEventQueueName This is the name of the input queue. This queue is same as value for 'service/rabbitmq/violatedeventsqueue' consul key. Initial value for this metric is 'violated-events'.
readNorThresholdQueueName This is the name of the input queue. This queue is same as value for 'service/rabbitmq/northresholdsqueue' consul key. Initial value for this metric is 'nor-thresholds'.
writeAnomalyOutputSignalQueueName This is the name of the output queue. This queue is same as value for 'service/rabbitmq/anomalysignalsqueue' consul key. Initial value for this metric is 'anomaly-event-signal-messages'.
writeAnomalyOutputActionQueueName This is the name of the output queue. This queue is same as value for 'service/rabbitmq/anomalyactionsqueue' consul key. Initial value for this metric is 'anomaly-event-action-messages'.
violationCount This is the number of violated events. Initial value for this metric is 0.
anomalyCount This is the number of anomaly events. Initial value for this metric is 0.
redisKeysNotFound Event Detector reads data from Redis cache using Redis keys. If event detector does not receive data for any Redis key(s), value for this metric increases by 1. Initial value for this metric is 0.
snapshots This metric stores the number of incoming or outgoing messages to or from the queues corresponding to following consul keys:
service/rabbitmq/staticaggregatedkpiqueue
service/rabbitmq/violatedeventsqueue
service/rabbitmq/northresholdsqueue
service/rabbitmq/anomalysignalsqueue
service/rabbitmq/anomalyactionsqueue
Initial value for this metric is {}. Value of this metric resets periodically as per the value of 'service/eventdetector/health/metrics/updateinterval/milliseconds' consul key.

For Example:
/accounts/qa-d681ef13-d690-4917-9f3a-6c79b-1/instances/SAMPLE_HOST_01_Inst_1-DC/maintenanceDetails=1
/accounts/qa-d681ef13-d690-4917-9f3a-6c79b-1/services/Sample-App-Service-DC/maintenanceDetails=1
anomaly-event-action-messages=1
anomaly-event-signal-messages=1
static-aggregated-kpi=1
WorkerActiveSize This is the total number of active threads. Initial value for this metric is 0.
WorkerPoolSize This is the total number of threads in the pool. This is the maximum number of threads that can go in active state. Initial value for this metric is 0.
WorkerQueueSize This is the total number of tasks present in the queue which are pending due to active threads count matching the pool size. Initial value for this metric is 0.
aggregatedKpiProcessingErrors This is the total number of validation errors while processing input Aggregated KPIs data. Initial value for this metric is 0.
violatedEventProcessingErrors This is the total number of validation errors while processing input violated events data. Initial value for this metric is 0.
norThresholdProcessingErrors This is the total number of validation errors while processing input NOR thresholds data. Initial value for this metric is 0.
minProcessTimeAggregatedKPI This is the minimum time for processing aggregated KPIs data in ms. Initial value for this metric is 0.
maxProcessTimeAggregatedKPI This is the maximum time for processing aggregated KPIs data in ms. Initial value for this metric is 0.
minProcessTimeViolatedEvent This is the minimum time for processing violated events data. Initial value for this metric is 0.
maxProcessTimeViolatedEvent This is the maximum time for processing violated events data. Initial value for this metric is 0.
minTimeNorThreshold This is the minimum time for processing NOR thresholds data. Initial value for this metric is 0.
maxTimeNorThreshold This is the maximum time for processing NOR thresholds data. Initial value for this metric is 0.
rmqReadErrors This is the number of errors while Event Detector reads data from RMQ. Initial value for this metric is 0.
rmqWriteErrors This is the number of errors while Event Detector writes data to RMQ. Initial value for this metric is 0.
slowAggregatedKpiEvents This is the number of slow aggregated KPI events that Event Detector processed. Initial value for this metric is 0.
slowThresholdEvents This is the number of slow NOR threshold events that Event Detector processed. Initial value for this metric is 0.
slowViolatedEvents This is the number of slow violated events that Event Detector processed. Initial value for this metric is 0.
thresholdForAggregatedKPI This is the value of 'slowAggregatedKpiEvents' consul key. Initial value for this metric is 0.
thresholdForNorThreshold This is the value of 'slowThresholdEvents' consul key. Initial value for this metric is 0.
thresholdForViolatedEvent This is the value of 'slowViolatedEvents' consul key. Initial value for this metric is 0.
violatedEventProcessingErrors This is the total number of validation errors while Event Detector processes input violated events data. Initial value for this metric is 0.
kpisProcessedForAggregateKPIs This is the number of aggregated KPIs that Event Detector processed.
kpisProcessedForNorThreshold This is the number of threshold events that Event Detector processed.
kpisProcessedForViolatedEvents This is the number of violated events that Event Detector processed.

You can view the KPIs of HEAL modules such as the Event Detector in Control Center, and set thresholds for them at service level and instance level. See Set KPI thresholds for a service.