Schema configuration reference

This page documents the configuration for Vector’s internal schema system.

For other top-level configuration options, see:

  • Global Options - Global settings like data directories and timezone
  • Pipeline Components - Configure sources, transforms, sinks, and enrichment tables
  • API - Configure Vector's observability API
  • Secrets - Configure secrets management

log_schema

optional object

Default log schema for all events.

This is used if a component does not have its own specific log schema. All events use a log schema, whether or not the default is used, to assign event fields on incoming events.

log_schema.host_key

optional string

The name of the event field to treat as the host which sent the message.

This field will generally represent a real host, or container, that generated the message, but is somewhat source-dependent.

default: .host

log_schema.message_key

optional string

The name of the event field to treat as the event message.

This would be the field that holds the raw message, such as a raw log line.

default: .message

The name of the event field to set the event metadata in.

Generally, this field will be set by Vector to hold event-specific metadata, such as annotations by the remap transform when an error or abort is encountered.

default: .metadata

The name of the event field to set the source identifier in.

This field will be set by the Vector source that the event was created in.

default: .source_type
The name of the event field to treat as the event timestamp.
default: .timestamp

schema

optional object

Schema options.

Note: The enabled and validation options are experimental and should only be enabled if you understand the limitations. While the infrastructure exists for schema tracking and validation, the full vision of automatic semantic field mapping and comprehensive schema enforcement was never fully realized.

If you encounter issues with these features, please report them here.

schema.enabled

optional bool
When enabled, Vector tracks the schema (field types and structure) of events as they flow from sources through transforms to sinks. This allows Vector to understand what data each component receives and produces.
default: false

Controls how metadata is stored in log events.

When set to false (legacy mode), metadata fields like host, timestamp, and source_type are stored as top-level fields alongside your log data.

When set to true (Vector namespace mode), metadata is stored in a separate metadata namespace, keeping it distinct from your actual log data.

See the Log Namespacing guide for detailed information about when to use Vector namespace mode and how to migrate from legacy mode.

schema.validation

optional bool

When enabled, Vector validates that events flowing into each sink match the schema requirements of that sink. If a sink requires certain fields or types that are missing from the incoming events, Vector will report an error during configuration validation.

This helps catch pipeline configuration errors early, before runtime.

default: false