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
# General
data_dir = "/var/lib/vector" # optional, no default
dns_servers = ["0.0.0.0:53"] # optional, no default
# Log schema
log_schema.host_key = "host" # optional, default
log_schema.kubernetes_key = "kubernetes" # optional, default
log_schema.message_key = "message" # optional, default
log_schema.source_type_key = "source_type" # optional, default
log_schema.timestamp_key = "timestamp" # optional, default
  • stringoptional

    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 dir.

    See Data Directory for more info.

    • No default
    • View examples
  • [string]optional

    dns_servers

    The list of DNS servers Vector will use to resolve DNS requests. When set Vector will ignore the system configuration and use only the list of DNS servers provided. If this option is not set then Vector will attempt to use the system configuration.

    • No default
    • View examples
  • tableoptional

    log_schema

    The default log schema that all Vector components operate on. See the log data model page for more info.

    • stringoptional

      host_key

      The key used to hold the log host. See the log data model page for more info.

      • Default: "host"
      • View examples
    • stringoptional

      kubernetes_key

      The key under which Kubernetes related fields are nested.

      • Default: "kubernetes"
      • View examples
    • stringoptional

      message_key

      The key used to hold the log message. See the log data model page for more info.

      • Default: "message"
      • View examples
    • stringoptional

      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
    • stringoptional

      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

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.