Logfmt Parser Transform

The Vector logfmt_parser transform accepts and outputs log events allowing you to extract data from a logfmt-formatted log field.

Configuration

vector.toml
[transforms.my_transform_id]
# REQUIRED - General
type = "logfmt_parser" # must be: "logfmt_parser"
inputs = ["my-source-id"] # example
# OPTIONAL - General
drop_field = true # default
field = "message" # default
# OPTIONAL - Types
[transforms.my_transform_id.types]
status = "int" # example
duration = "float" # example
success = "bool" # example
timestamp = "timestamp|%F" # example
timestamp = "timestamp|%a %b %e %T %Y" # example

Options

3 items
boolcommonrequired

drop_field

If the specified field should be dropped (removed) after parsing.

Default: true
View examples
stringcommonrequired

field

The log field to parse.

Default: "message"
View examples
tablecommonoptional

types

Key/Value pairs representing mapped log field types.

stringenumcommonoptional

[field-name]

A definition of log field type conversions. They key is the log field name and the value is the type. strptime specifiers are supported for the timestamp type.

No default
Enum, must be one of: "bool" "float" "int" "string" "timestamp"
View examples

How It Works

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.