Filter Steps Reference
This page contains a thorough reference for each of the 12 transformation steps that the EventProcessor parsing pipeline offers.
1. json
Reads a JSON string and retrieves its keys.
Fields:
source(Required),where(Optional CEL expression).Placement: All extracted keys are automatically prefixed with
log.(e.g.,{"id": 1}becomeslog.id: 1).
Example:
- json:
source: raw
where: 'contains(raw, "{")'2. rename
Assigns new names to existing fields.
Fields:
from(Array of source paths),to(Target path),where(Optional).Behavior: Transfers the value from the source path to the target path.
Example:
- rename:
from: [log.user_name, log.login]
to: origin.user
where: 'exists("log.user_name")'3. cast
Converts field types.
Fields:
fields(Array),to(Target type),where(Optional).Supported Types:
int,float,string,bool,[]string.
Example:
- cast:
fields: [origin.port]
to: int4. delete
Deletes fields from the log in order to improve storage and indexing.
Fields:
fields(Array),where(Optional).
Example:
- delete:
fields: [log.temporary_header, log.internal_id]Important: The raw field is protected for auditing purposes and cannot be removed by the delete step.
5. grok
Matching patterns in unstructured text.
Fields:
source(Defaults toraw),patterns(List of{ fieldName, pattern }),where(Optional).Placement: Uses the
fieldNameprovided in the pattern list literally. To use standard namespaces, indicate them (e.g.,origin.ip). Per convention, custom fields should uselog..Extensibility: Users can add or modify standard patterns through the Unified Security Stack WebUI.
Default Standard Patterns
| Alias | Description | Example / Match |
|---|---|---|
{{.ipv4}} | IPv4 address | 192.168.1.1 |
{{.ipv6}} | IPv6 address | 2001:0db8:85a3:0000:0000:8a2e:0370:7334 |
{{.hostname}} | Hostname | server-01.local |
{{.domain}} | Domain server | example.com |
{{.email}} | Email address | [email protected] |
{{.uuid}} | UUID values | 550e8400-e29b-41d4-a716-446655440000 |
{{.integer}} | Signed or unsigned numbers | 0, 54, +23, -11 |
{{.word}} | Complete words (can contain _, -) | event_log-01 |
{{.greedy}} | Full string (matches everything) | .* |
{{.data}} | Matches until the next pattern | .*? |
{{.space}} | One or more spaces | \s+ |
{{.notSpace}} | One or more non-spaces | \S+ |
{{.commonMacAddr}} | Common MAC address (colon or dash) | 00:1A:2B:3C:4D:5E |
{{.winMacAddr}} | Windows MAC address (dash) | 00-1A-2B-3C-4D-5E |
{{.ciscoMacAddr}} | CISCO MAC address | 001a.2b3c.4d5e |
{{.syslogDate}} | Syslog date format | Jun 16 12:34:56 |
{{.time}} | H24:mm:SS (with optional ms) | 18:30:05.123 |
{{.hour}} | H24 hour format | 07, 18, 23 |
{{.minute}} | mm minute format | 02, 10, 59 |
{{.seconds}} | SS (with optional ms) | 05.450 |
{{.iso8601Timezone}} | ISO8601 Timezone | Z, +05:00 |
{{.year}} | Year (1000-9999) | 2024 |
{{.monthName}} | Month name (full or abbreviated) | January, Feb, marz |
{{.monthNumber}} | Month number (01-12) | 01, 10 |
{{.monthDay}} | Day of month (1-31) | 01, 14, 31 |
{{.day}} | Day name (full or abbreviated) | Monday, Mon |
Example:
- grok:
source: raw
patterns:
- fieldName: origin.ip
pattern: '{{.ipv4}}'
- fieldName: log.event_id
pattern: 'ID: {{.integer}}'6. kv (Key-Value)
Pulls key-value pairs out of a string.
Fields:
source,fieldSplit(Separator between pairs),valueSplit(Separator between key and value),where(Optional).Placement: Like the
jsonstep, all extracted keys are automatically prefixed withlog..
Example:
- kv:
source: raw
fieldSplit: " "
valueSplit: "="7. trim
Sanitizes strings through the removal of prefixes, suffixes, or pattern matches.
Fields:
fields(Array),function(prefix,suffix,substring,regex),substring(the string or pattern to trim),where(Optional).
Example:
- trim:
function: suffix
substring: ".local"
fields: [origin.host]8. add
Inserts a constant value into a field.
Fields:
function(string),params(Map),where(Optional).Required Params:
key(target path),value(the specific value to be added).Placement: Uses the
keyliterally.
Example:
- add:
function: string
params:
key: log.category
value: security9. reformat
Transforms field formats, mainly for timestamps.
Fields:
fields(Array),function(time),fromFormat(Go layout),toFormat(Go layout),where(Optional).Behavior: Overwrites the value in the specified
fields.
Example:
- reformat:
fields: [deviceTime]
function: time
fromFormat: 'Jan 02 15:04:05'
toFormat: '2006-01-02T15:04:05Z'10. csv
Reads comma-separated values.
Fields:
source,separator,headers(Array of target paths),where(Optional).Placement: Uses the names provided in
headersliterally.
Example:
- csv:
source: raw
separator: ","
headers: [log.id, origin.user, action, actionResult]11. dynamic
Invokes an external gRPC plugin.
Fields:
plugin(Name),params(Key-value map),where(Optional).
Example:
- dynamic:
plugin: com.synoti.geolocation
params:
source: origin.ip
destination: origin.geolocation12. drop
Drops the log right away.
Required:
where(CEL condition).
Example:
- drop:
where: equals("origin.ip", "127.0.0.1")