Introduction
Aggregations and Correlations are the mechanisms that allow incoming alerts to relate to one another. Both are written using a custom expression language calledAggQL.
Aggregations group incoming Security Events into a single alert. When multiple events relate to the same underlying activity, aggregation rules consolidate them so you aren’t overwhelmed with duplicate alerts.
Correlations identify connections between separate alerts. When different detection rules fire on related activity, correlation rules surface the relationship so analysts can see the bigger picture.
Common Use Cases
The most common scenario is reducing alert fatigue by grouping repeat events. For example, if a brute-force detection fires dozens of times against the same host, you can aggregate those events into one alert:alertIsOpen():
Combining Expressions
Functions can be combined using logical operators to build more specific rules:Built-in Correlation Rules
Sonar ships with a set of default correlation rules. These are ready to use out of the box and cover the most common analyst workflows:Time Windows
Correlation rules support two time window settings that control how far back the engine looks for related alerts:- Alert Creation Window — The maximum time since the first event. Limits how old an alert can be and still be considered for correlation.
- Last Event Window — The maximum time since the last event. Ensures only recently active alerts are matched.
Available Functions
sameField
Matches events that share the same value for a given field name. This is the most flexible function — it works with any field present in your Security Events.
src_ip vs source_ip), combine multiple sameField calls with or:
sameHost
Matches events originating from the same host. This is a convenience function that checks multiple common hostname fields automatically: host, hostname, and computer_name.