Basic structure
A filter is one or morefield:value predicates. Multiple predicates are combined with AND by default:
Operators
Logical operators
- AND joins predicates that must all match. It is implied between predicates, so you can usually omit it.
- OR matches when any predicate matches. Wrap OR groups in parentheses.
CIDR and IP ranges
You can match IP addresses using CIDR notation or numeric ranges:Visual builder vs. DSL mode
In the rule builder, the Filter input offers two modes:- Visual builder: Build AND/OR chains row by row, picking a field, an operator, and a value with auto-complete. This covers most common filters.
- DSL mode: A text box for the full syntax above. Switch to DSL mode when you need negation, ranges (
[N TO M]), CIDR matching, deeply nested groups, or a top-level OR.
Examples
Detect AWS root console logins:Tips
- Balance your delimiters. Parentheses
(), brackets[], and quotes"must be balanced, or the filter is rejected. - Do not leave a value empty after a colon, since
eventAction:is invalid. - Use known field names. Unknown fields are flagged with a suggestion. Let the auto-complete guide you to canonical field names.
- Combine with group-by. Filters select events; the rule’s Group by and Aggregation settings decide how those events are counted. See Creating Custom Detection Rules.
Next steps
- Creating Custom Detection Rules: use these filters in a rule.
- Investigating Signals: filter the signals list with the same syntax.