Logfmt Parser Transform

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


# General
type = "logfmt_parser" # required
inputs = ["my-source-id"] # required
drop_field = true # optional, default
field = "message" # optional, default
# Types
types.status = "int" # example
types.duration = "float" # example
types.success = "bool" # example
types.timestamp = "timestamp|%F" # example
types.timestamp = "timestamp|%a %b %e %T %Y" # example
types.parent.child = "int" # example
3 items


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

Default: true
View examples


The log field to parse.

See Field Notation Syntax for more info.

Default: "message"
View examples


Key/value pairs representing mapped log field names and types. This is used to coerce log fields into their proper types.



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

Complex Processing

If you encounter limitations with the logfmt_parser transform then we recommend using a runtime transform. These transforms are designed for complex processing and give you the power of full programming runtime.

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.

Field Notation Syntax

The field options support Vector's field notiation syntax, enabling access to root-level, nested, and array field values. For example:

# ...
field = "message"
field = "parent.child"
field = "array[0]"
# ...

You can learn more about Vector's field notation in the field notation reference.