KV
Synopsis
Parses strings to extract key-value pairs into structured fields.
Schema
- kv:
field: <ident>
field_split: <regex>
value_split: <regex>
description: <text>
exclude_keys: <string[]>
if: <script>
ignore_casting: <boolean>
ignore_failure: <boolean>
ignore_missing: <boolean>
include_keys: <string[]>
lowercase_keys: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
prefix: <string>
strip_brackets: <boolean>
tag: <string>
target_field: <ident>
trim_key: <char[]>
trim_value: <char[]>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Source field containing key-value pairs |
field_split | Y | - | Delimiter between key-value pairs |
value_split | Y | - | Delimiter between keys and values |
description | N | - | Documentation note |
exclude_keys | N | - | Keys to exclude from output |
if | N | - | Conditional expression |
ignore_casting | N | false | Disable automatic type conversion |
ignore_failure | N | false | Skip processing errors |
ignore_missing | N | false | Skip if input field missing |
include_keys | N | - | Only include specified keys |
lowercase_keys | N | false | Convert all keys to lowercase |
on_failure | N | - | Error handling processors |
on_success | N | - | Success handling processors |
prefix | N | - | Prefix for extracted keys |
strip_brackets | N | false | Remove brackets from values |
tag | N | - | Identifier for logging |
target_field | N | - | Output field for parsed data |
trim_key | N | - | Characters to trim from keys |
trim_value | N | - | Characters to trim from values |