Environment Variables

You can control Vector's behavior through select environment variables:

ENV_VAR1=val ENV_VAR2=val vector --config=/etc/vector/vector.toml

In addition, we recommend that you look at the global configuration options as well.

Special Variables

  • stringoptional

    AWS_ACCESS_KEY_ID

    Used for AWS authentication when communicating with AWS services. See relevant AWS components for more info.

    • No default
    • View examples
  • stringoptional

    AWS_SECRET_ACCESS_KEY

    Used for AWS authentication when communicating with AWS services. See relevant AWS components for more info.

    • No default
    • View examples
  • stringoptional

    DOCKER_HOST

    The docker host to connect to.

    • Default: "unix:///var/run/docker.sock"
    • View examples
  • booloptional

    DOCKER_VERIFY_TLS

    If true (the default), Vector will validate the TLS certificate of the remote host. Do NOT set this to false unless you understand the risks of not verifying the remote certificate.

    • Default: true
    • View examples
  • stringcommonoptional

    GOOGLE_APPLICATION_CREDENTIALS

    The filename for a Google Cloud service account credentials JSON file used to authenticate access to the Stackdriver Logging API.

    • No default
    • View examples
  • stringoptional

    LOG

    Sets Vector's log level. See the log section in the monitoring guide for more information on the available levels.

    • No default
    • View examples
  • booloptional

    RUST_BACKTRACE

    Enables backtraces when errors are logged. Use this when debugging only since it can degrade performance.

    • No default
    • View examples
  • stringcommonrequired

    VECTOR_NODE_NAME

    The name of the node whose Pod's log should be enriched. If you're using the provided daemon set then this environment variable is set for you.

    • No default
    • View examples

Custom Variables

As noticed in the configuration document, Vector supports custom environment variables via the ${...} syntax:

option = "${ENV_VAR}"

Default Values

Default values can be supplied via the :- syntax:

option = "${ENV_VAR:-default}"

Escaping

You can escape environment variable by preceding them with a $ character. For example $${HOSTNAME} will be treated literally in the above environment variable example.