Skip to main content
Aggregations and Correlations are the mechanisms that allow incoming alerts to relate to one another. Aggregations help de-duplicate incoming alerts, by grouping incoming Security Events into a single alert. This is useful when you have multiple alerts for the same event, and you want to group future security events into a single alert. Correlations help you relate incoming alerts to one another, by grouping alerts that are related to one another. This is useful when you have multiple alerts for different events, but they are related to the same security incident.

Query Language

Both Aggregations and Correlations are written as a custom language we call AggQL. This language is designed to be simple to use, and easy to understand. When we want new incoming Security Events to “aggregate” onto an already open Alert, we can create an aggregation rule to do this.
// Aggregates SecurityEvents with the same `field_name` onto the same alert
sameField('field_name')

Available Functions

FunctionDescriptionExample
sameField(field)Matches events with the same value for the specified fieldsameField("src_ip")
sameHost()Matches events from the same host (checks host, hostname, computer_name fields)sameHost()
sameDetection()Matches events triggered by the same detection rulesameDetection()
alertIsOpen()Only matches events belonging to alerts with “open” statusalertIsOpen()
window(seconds)Only matches events created within the specified time windowwindow(3600)

Combining Functions

Functions can be combined using logical operators:
  • and - Both conditions must be true
  • or - Either condition must be true
  • not - Negates a condition
// Complex expression combining multiple conditions
sameHost() and alertIsOpen() and window(3600)
// Match events from same source OR same destination IP
sameField("src_ip") or sameField("dest_ip")
// Match same host but different port
sameHost() and not sameField("port")

Aggregations

Aggregation rules automatically group incoming Security Events into existing alerts when they match the rule expression. This reduces alert fatigue by consolidating related events.

Common Aggregation Patterns

PatternExpressionUse Case
Same HostnamesameHost()Group events from the same system
Same Event TypesameField("event")Group identical event types
Same SourcesameField("src_ip")Group events from same attacker

Correlations

Correlation rules help analysts find related alerts across different events. Unlike aggregations (which merge events into one alert), correlations identify connections between separate alerts.

Built-in Correlation Rules

The following correlation rules are available by default:
RuleExpressionDescription
Same HostsameHost()Find alerts from the same host/hostname. Useful for identifying attack chains or repeated activity on a single system.
Same Source IPsameField("src_ip") or sameField("source_ip") or sameField("src")Find alerts with the same source IP address. Helps identify attacks originating from the same attacker.
Same Destination IPsameField("dest_ip") or sameField("destination_ip") or sameField("dest")Find alerts targeting the same destination IP. Useful for identifying coordinated attacks on a target.
Same UsersameField("user") or sameField("username") or sameField("account_name")Find alerts involving the same user account. Helps track compromised accounts or insider threats.
Same Detection RulesameDetection()Find alerts triggered by the same detection rule. Useful for identifying patterns of similar threats.
Same ProcesssameField("process") or sameField("process_name") or sameField("image")Find alerts involving the same process or executable. Helps identify malware persistence or lateral movement.
Same Host and UsersameHost() and (sameField("user") or sameField("username"))Find alerts from the same host involving the same user. Provides context for user-specific activity on a system.
Same Source and Destination(sameField("src_ip") or sameField("source_ip")) and (sameField("dest_ip") or sameField("destination_ip"))Find alerts with the same source and destination pair. Identifies repeated communication patterns.
Recent Open Alerts - Same HostsameHost() and alertIsOpen() and window(3600)Find recent open alerts from the same host. Prioritizes active investigations.
Same File HashsameField("file_hash") or sameField("md5") or sameField("sha1") or sameField("sha256")Find alerts involving the same file hash. Identifies the same malware across different systems.

Time Windows

Correlation rules support two time window settings:
  • Last Event Window - How far back to look for related events (e.g., 24 hours, 7 days)
  • Alert Creation Window - How recently the alert must have been created to be considered
These windows help focus correlations on relevant timeframes and improve query performance.