Dissect
Schema
dissect:
- field: <ident>
- pattern: <string>
- append_separator: <char>
- description: <text>
- if: <script>
- ignore_failure: <boolean>
- ignore_missing: <boolean>
- on_failure: <processor[]>
- on_success: <processor[]>
- tag: <string>
Synopsis
Extracts values from strings using predefined patterns without regular expressions.
Configuration
Field | Required | Default | Description |
---|---|---|---|
field | Y | - | Field containing the string to dissect |
pattern | Y | - | Pattern with named capture groups using %{key} syntax |
append_separator | N | " " | Single character used as separator when appending fields |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | See Handling Failures |
ignore_missing | N | false | If true and field doesn't exist or is null , exit quietly |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
The processor splits input strings on delimiters and assigns values to named keys specified in the pattern.
Patterns are matched verbatim. Use %{keyname}
to capture values into named fields: nested fields can be created using dot notation in key names. The captured values are stored as strings.
Unlike regular expressions, dissect patterns require exact matching of separators and spacing. Use pattern modifiers to handle variable whitespace.
The input string must be fully consumed by the pattern, and all named groups—i.e. %{keyname}
—must capture a value.
Use the ignore_missing
flag when the field may not always exist, and ignore_failure
when pattern matching failures should be tolerated.
The separator in append_separator
must be a single character. All named capture groups must extract a non-empty value.
Examples
Basic Extraction
Extracting first name, last name, and age... |
|
creates separate fields: |
|
Nested Fields
Extracting error details from a log message... |
|
creates a nested event structure: |
|
Non-String Fields
When the field is not a string... |
|
the raised error is captured: |
|
Error Handling
If the pattern doesn't match... |
|
the raised error can be ignored: |
|