Global Options
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, 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.
- Default:
"/var/lib/vector/" - View examples
- Default:
- optionaltable
log_schema
The default log schema that all Vector components operate on. See the log data model page for more info.
- optionalstring
host_key
The key used to hold the log host. See the log data model page for more info.
- Default:
"host" - View examples
- Default:
- optionalstring
message_key
The key used to hold the log message. See the log data model page for more info.
- Default:
"message" - View examples
- Default:
- optionalstring
source_type_key
The key used to hold the log source type. See the log data model page for more info.
- Default:
"source_type" - View examples
- Default:
- optionalstring
timestamp_key
The key used to represent when the log was generated. See the log data model page for more info.
- Default:
"timestamp" - View examples
- Default:
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.