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 objectDefault 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 stringThe 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.
.hostlog_schema.message_key
optional stringThe 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.
.messagelog_schema.metadata_key
optional stringThe 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.
.metadatalog_schema.source_type_key
optional stringThe 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.
.source_typelog_schema.timestamp_key
optional string.timestampschema
optional objectSchema 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 boolfalseschema.log_namespace
optional boolControls 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 boolWhen 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.
false