Global Options Reference
In addition to sources, transforms, and sinks, Vector accepts global options that serve to configure Vector as a whole and set defaults for component options.
Configuration
- vector.toml
- vector.yaml
- vector.json
# Generaldata_dir = "/var/lib/vector/" # optional, defaulttimezone = "local" # optional, default# Healthcheckshealthchecks.enabled = true # optional, defaulthealthchecks.require_healthy = false # optional, default# Log_schemalog_schema.host_key = "host" # optional, defaultlog_schema.message_key = "message" # optional, defaultlog_schema.source_type_key = "source_type" # optional, defaultlog_schema.timestamp_key = "timestamp" # optional, default
- optionalstring
data_dir
The directory used for persisting Vector state, such as on-disk buffers, file checkpoints, and more. Please make sure the Vector project has write permissions to this directory. See Data Directory for more info.
- Syntax:
literal
- Default:
"/var/lib/vector/"
- View examples
- Syntax:
- optionaltable
healthchecks
Configures health checks for all sinks.
- commonoptionalbool
enabled
Disables all health checks if false, otherwise sink specific option overrides it.
- Default:
true
- View examples
- Default:
- optionalbool
require_healthy
Exit on startup if any sinks' health check fails. Overridden by
--require-healthy
command line flag.- Default:
false
- View examples
- Default:
- optionaltable
log_schema
Configures default log schema for all events. This is used by Vector source components to assign the fields on incoming events.
- commonoptionalstring
host_key
Sets the event key to use for the event host field.
- WARNING: This option is deprecated in-lieu of using [`remap` transform][docs.transforms.remap] to rename fields
- Syntax:
literal
- Default:
"host"
- View examples
- commonoptionalstring
message_key
Sets the event key to use for the event message field.
- WARNING: This option is deprecated in-lieu of using [`remap` transform][docs.transforms.remap] to rename fields
- Syntax:
literal
- Default:
"message"
- View examples
- commonoptionalstring
source_type_key
Sets the event key to use for the event source type field that is set by some sources.
- WARNING: This option is deprecated in-lieu of using [`remap` transform][docs.transforms.remap] to rename fields
- Syntax:
literal
- Default:
"source_type"
- View examples
- commonoptionalstring
timestamp_key
Sets the event key to use for the event timestamp field.
- WARNING: This option is deprecated in-lieu of using [`remap` transform][docs.transforms.remap] to rename fields
- Syntax:
literal
- Default:
"timestamp"
- View examples
- optionalstring
timezone
The name of the time zone to apply to timestamp conversions that do not contain an explicit time zone. The time zone name may be any name in the TZ database, or
local
to indicate system local time.- Syntax:
literal
- Default:
"local"
- View examples
- Syntax:
How It Works
Data Directory
Vector requires a data_dir
value for on-disk operations. Currently, the only
operation using this directory are Vector's on-disk buffers. Buffers, by
default, are memory-based, but if you switch them to disk-based you'll need to
specify a data_dir
.