Skip to content

Filter

Filter (filter)

Only let certain events pass through.

Transform json

Minimal example

actions:
- filter:
how:
schema: []
JSON
{
"actions": [
{
"filter": {
"how": {
"schema": []
}
}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
howHowThe four ways to filter events: by schema, by patterns matching, by patterns not matching, or if empty.
descriptionstringdescribe this step.
conditionstringOnly filter if this condition is true.
discard-untilboolean (bool)if true, then we will discard events until the filter is green Thereafter, we pass all events through.

Schema

How Options

OptionNameTypeDescription
schemaSchemastring[]Accept events that contain only given fields; only lets these fields through.
patternsPatternsmapPatterns that must match the field values for the event to go through.
excludeExcludemapPatterns that must not match for the event to go through.
emptyEmptyboolDrop all empty events (events with no fields, empty arrays, or empty strings).
expressionExpressionstringFilter using an expression.

How - Patterns Table

FieldRegex
event.field^value$

Key format: field. Value format: regex.

How - Exclude Table

FieldRegex
event.field^value$

Key format: field. Value format: regex.