The Vector command line interface

Vector is a single binary that be managed through a command line interface. This page documents all of the available flags, options, subcommands, and environment variables.

Commands

vector

The root command (no subcommand) starts Vector.

vector [FLAGS] [OPTIONS] [SUBCOMMAND] [ARGS]
FlagsDescriptionEnvironment variableDefault
--help ,
-h
Prints help information
--quiet ,
-q
Reduce detail of internal logging. Repeat to reduce further. Overrides --verbose.
--require-healthy ,
-r
Exit on startup if any sinks fail healthchecks
VECTOR_REQUIRE_HEALTHY
--verbose ,
-v
Enable more detailed logging. Repeat to reduce further. Overrides --verbose.
--version ,
-V
Prints version information
--watch-config ,
-w
Watch for changes in the configuration file and reload accordingly
VECTOR_WATCH_CONFIG
OptionsDescriptionEnvironment variableDefault
--color
Control when ANSI terminal formatting is used.
Enum options
OptionDescription
alwaysAlways enable ANSI terminal formatting always
autoDetect ANSI terminal formatting and enable if supported
neverDisable ANSI terminal formatting
VECTOR_COLORauto
--config ,
-c
Read configuration from one or more files. Wildcard paths are supported. If no files are specified the default config path /etc/vector/vector.toml is targeted. TOML, YAML and JSON file formats are supported. The format to interpret the file with is determined from the file extension (.toml, .yaml, .json). Vector falls back to TOML if it can’t detect a supported format.
VECTOR_CONFIG/etc/vector/vector.toml
--config-dir
Read configuration from files in one or more directories. The file format is detected from the file name. Files not ending in .toml, .json, .yaml, or .yml are ignored.
VECTOR_CONFIG_DIR
--config-json
Read configuration from one or more files. Wildcard paths are supported. JSON file format is assumed.
VECTOR_CONFIG_JSON
--config-toml
Read configuration from one or more files. Wildcard paths are supported. TOML file format is assumed.
VECTOR_CONFIG_TOML
--config-yaml
Read configuration from one or more files. Wildcard paths are supported. YAML file format is assumed.
VECTOR_CONFIG_YAML
--log-format
Set the logging format
Enum options
OptionDescription
jsonOutput Vector's logs as JSON.
textOutput Vector's logs as text.
VECTOR_LOG_FORMATtext
--threads ,
-t
The number of threads to use for processing (the default is the number of available cores)
VECTOR_THREADS

vector generate

Generate a Vector configuration containing a list of components
vector generate [FLAGS] [OPTIONS] [ARGUMENTS]
FlagsDescriptionEnvironment variableDefault
--fragment ,
-f
Whether to skip the generation of global fields
--help ,
-h
Prints help information
--version ,
-V
Prints version information
OptionsDescriptionEnvironment variableDefault
--file
Generate config as a file
ArgumentsRequiredDescriptionTypeDefault
pipelinefalsePipeline expression, e.g. stdin/json_parser,add_fields/consolestringnone

vector graph

Generate a visual representation of topologies. The output is in the DOT format, which can be rendered using GraphViz.

You can also visualize the output online at webgraphviz.com.

vector graph [OPTIONS]

Example

vector graph --config /etc/vector/vector.toml | dot -Tsvg > graph.svg
OptionsDescriptionEnvironment variableDefault
--config ,
-c
Read configuration from one or more files. Wildcard paths are supported. If no files are specified the default config path /etc/vector/vector.toml is targeted. TOML, YAML and JSON file formats are supported. The format to interpret the file with is determined from the file extension (.toml, .yaml, .json). Vector falls back to TOML if it can’t detect a supported format.
VECTOR_CONFIG/etc/vector/vector.toml
--config-dir
Read configuration from files in one or more directories. The file format is detected from the file name. Files not ending in .toml, .json, .yaml, or .yml are ignored.
VECTOR_CONFIG_DIR
--config-json
Read configuration from one or more files. Wildcard paths are supported. JSON file format is assumed.
VECTOR_CONFIG_JSON
--config-toml
Read configuration from one or more files. Wildcard paths are supported. TOML file format is assumed.
VECTOR_CONFIG_TOML
--config-yaml
Read configuration from one or more files. Wildcard paths are supported. YAML file format is assumed.
VECTOR_CONFIG_YAML

vector help

Prints this message or the help of the given subcommand(s)
vector help

vector list

List available components, then exit
vector list [FLAGS] [OPTIONS]
FlagsDescriptionEnvironment variableDefault
--help ,
-h
Prints help information
--version ,
-V
Prints version information
OptionsDescriptionEnvironment variableDefault
--format
Format the list in an encoding schema
Enum options
OptionDescription
avroOutput components in Apache Avro format
jsonOutput components as JSON
textOutput components as text
text

vector tap

Observe log events from topology components.
vector tap [FLAGS] [OPTIONS] [ARGUMENTS]
FlagsDescriptionEnvironment variableDefault
--help ,
-h
Prints help information
--version ,
-V
Prints version information
OptionsDescriptionEnvironment variableDefault
--format ,
-f
Encoding format for logs printed to screen
Enum options
OptionDescription
jsonOutput events as JSON
yamlOutput events as YAML
json
--interval ,
-i
Interval to sample metrics at, in milliseconds
500
--limit ,
-l
Sample log events to the provided limit
100
--url ,
-u
Vector GraphQL API server endpoint
ArgumentsRequiredDescriptionTypeDefault
componentsfalseComponents to observe (comma-separated; accepts glob patterns).list*

vector test

Run Vector config unit tests, then exit. This command is experimental and therefore subject to change. For guidance on how to write unit tests check out the unit testing documentation.
vector test [OPTIONS] [ARGUMENTS]
OptionsDescriptionEnvironment variableDefault
--config-json
Test configuration from one or more files. Wildcard paths are supported. JSON file format is assumed.
VECTOR_CONFIG_JSON
--config-toml
Test configuration from one or more files. Wildcard paths are supported. TOML file format is assumed.
VECTOR_CONFIG_TOML
--config-yaml
Test configuration from one or more files. Wildcard paths are supported. YAML file format is assumed.
VECTOR_CONFIG_YAML
ArgumentsRequiredDescriptionTypeDefault
pathsfalseAny number of Vector config files to test. If none are specified the default config path /etc/vector/vector.toml will be targetedlist/etc/vector/vector.toml

vector top

Display topology and metrics in the console, for a local or remote Vector instance
vector top [FLAGS] [OPTIONS]
FlagsDescriptionEnvironment variableDefault
--help ,
-h
Prints help information
--human-metrics ,
-h
Humanize metrics, using numeric suffixes - e.g. 1,100 = 1.10 k, 1,000,000 = 1.00 M
--version ,
-V
Prints version information
OptionsDescriptionEnvironment variableDefault
--refresh-interval ,
-i
How often the screen refreshes (in milliseconds)
500
--url ,
-u
The URL for the GraphQL endpoint of the running Vector instance

vector validate

Validate the target config, then exit
vector validate [FLAGS] [OPTIONS] [ARGUMENTS]
FlagsDescriptionEnvironment variableDefault
--deny-warnings ,
-d
Fail validation on warnings
--help ,
-h
Prints help information
--no-environment ,
-ne
Disables environment checks. That includes component checks and health checks
--version ,
-V
Prints version information
OptionsDescriptionEnvironment variableDefault
--config-json
Any number of Vector config files to validate. JSON file format is assumed.
--config-toml
Any number of Vector config files to validate. TOML file format is assumed.
--config-yaml
Any number of Vector config files to validate. YAML file format is assumed.
ArgumentsRequiredDescriptionTypeDefault
pathsfalseAny number of Vector config files to validate. If none are specified the default config path /etc/vector/vector.toml will be targetedlist/etc/vector/vector.toml

vector vrl

Vector Remap Language CLI
vector vrl [FLAGS] [OPTIONS] [ARGUMENTS]
FlagsDescriptionEnvironment variableDefault
--help ,
-h
Prints help information
--print-object ,
-o

Print the (modified) object, instead of the result of the final expression.

The same result can be achieved by using . as the final expression.

--version ,
-V
Prints version information
OptionsDescriptionEnvironment variableDefault
--input ,
-i
File containing the object(s) to manipulate. Leave empty to use stdin.
--program ,
-p
File containing the program to execute. Can be used instead of PROGRAM.
ArgumentsRequiredDescriptionTypeDefault
programfalseThe program to execute. For example, ".foo = true" sets the object’s foo field to true.stringnone

Environment variables

AWS_ACCESS_KEY_ID

common optional string literal
The AWS access key id. Used for AWS authentication when communicating with AWS services.
Examples
AKIAIOSFODNN7EXAMPLE

AWS_CONFIG_FILE

common optional string literal
Specifies the location of the file that the AWS CLI uses to store configuration profiles.
Default: ~/.aws/config

AWS_CREDENTIAL_EXPIRATION

common optional string literal
Expiration time in RFC 3339 format. If unset, credentials won’t expire.
Examples
1996-12-19T16:39:57-08:00

AWS_DEFAULT_REGION

common optional string literal
The default AWS region.
Examples
/path/to/credentials.json

AWS_PROFILE

common optional string literal
Specifies the name of the CLI profile with the credentials and options to use. This can be the name of a profile stored in a credentials or config file.
Default: default
Examples
my-custom-profile

AWS_ROLE_SESSION_NAME

common optional string literal
Specifies a name to associate with the role session. This value appears in CloudTrail logs for commands performed by the user of this profile.
Examples
vector-session

AWS_SECRET_ACCESS_KEY

common optional string literal
The AWS secret access key. Used for AWS authentication when communicating with AWS services.
Examples
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

AWS_SESSION_TOKEN

common optional string literal
The AWS session token. Used for AWS authentication when communicating with AWS services.
Examples
AQoEXAMPLEH4aoAH0gNCAPy...truncated...zrkuWJOgQs8IZZaIv2BXIa2R4Olgk

AWS_SHARED_CREDENTIALS_FILE

common optional string literal
Specifies the location of the file that the AWS CLI uses to store access keys.
Default: ~/.aws/credentials

DOCKER_CERT_PATH

common optional string literal

Path to look for TLS certificates when tls configuration is absent. Vector will use:

  • $DOCKER_CERT_PATH/ca.pem: CA certificate.
  • $DOCKER_CERT_PATH/cert.pem: TLS certificate.
  • $DOCKER_CERT_PATH/key.pem: TLS key.
Examples
certs/

DOCKER_CONFIG

common optional string literal
Path to look for TLS certificates when both tls configuration and DOCKER_CERT_PATH are absent.
Examples
certs/

DOCKER_HOST

common optional string literal
The Docker host to connect to when docker_host configuration is absent.
Examples
unix:///var/run/docker.sock

GOOGLE_APPLICATION_CREDENTIALS

common optional string literal
The filename for a Google Cloud service account credentials JSON file used for authentication.
Examples
/path/to/credentials.json