Skip to content

Latest commit

 

History

History
265 lines (195 loc) · 5.38 KB

env-vars.md

File metadata and controls

265 lines (195 loc) · 5.38 KB
last_modified_on title description sidebar_label
2020-04-01
Environment Variables
A full list of Vector's supported environment variables and how to use them.
Env Vars

import Alert from '@site/src/components/Alert'; import Fields from '@site/src/components/Fields'; import Field from '@site/src/components/Field';

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

AWS_ACCESS_KEY_ID

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

AWS_SECRET_ACCESS_KEY

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

DOCKER_HOST

The docker host to connect to.

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.

GOOGLE_APPLICATION_CREDENTIALS

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

LOG

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

RUST_BACKTRACE

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

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.

Custom Variables

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

option = "${ENV_VAR}"

Interpolation is done before parsing the configuration file. This is done when starting and reloading Vector.

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.