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]
Flags | Description | Environment variable | Default |
---|---|---|---|
--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 --quiet . |
| |
--version
, -V | Prints version information |
| |
--watch-config
, -w | Watch for changes in the configuration file and reload accordingly | VECTOR_WATCH_CONFIG |
|
Options | Description | Environment variable | Default | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
--color | Control when ANSI terminal formatting is used. Enum options
| VECTOR_COLOR | auto | ||||||||
--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 | Test 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 |
| ||||||||
--internal-log-rate-limit
, -i | Set the internal log rate limit. This limits Vector from emitting identical logs more than once over the given number of seconds. | VECTOR_INTERNAL_LOG_RATE_LIMIT | 10 | ||||||||
--log-format | Set the logging format Enum options
| VECTOR_LOG_FORMAT | text | ||||||||
--threads
, -t | The number of threads to use for processing. The default is the number of available cores. | VECTOR_THREADS |
|
vector generate
vector generate [FLAGS] [OPTIONS] [ARGUMENTS]
Flags | Description | Environment variable | Default |
---|---|---|---|
--fragment
, -f | Whether to skip the generation of global fields |
| |
--help
, -h | Prints help information |
|
Options | Description | Environment variable | Default |
---|---|---|---|
--file | Generate config as a file |
|
Arguments | Required | Description | Type | Default |
---|---|---|---|---|
pipeline | false | Pipeline expression, e.g. stdin/remap,filter/console | string | none |
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]
Options | Description | Environment variable | Default | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
--color | Control when ANSI terminal formatting is used. Enum options
| VECTOR_COLOR | auto | ||||||||
--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 | Test 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 |
| ||||||||
--internal-log-rate-limit
, -i | Set the internal log rate limit. This limits Vector from emitting identical logs more than once over the given number of seconds. | VECTOR_INTERNAL_LOG_RATE_LIMIT | 10 | ||||||||
--log-format | Set the logging format Enum options
| VECTOR_LOG_FORMAT | text | ||||||||
--threads
, -t | The number of threads to use for processing. The default is the number of available cores. | VECTOR_THREADS |
|
vector list
vector list [FLAGS] [OPTIONS]
Flags | Description | Environment variable | Default |
---|---|---|---|
--help
, -h | Prints help information |
|
Options | Description | Environment variable | Default | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
--format | Format the list in an encoding schema Enum options
| text |
vector tap
vector tap [FLAGS] [OPTIONS] [ARGUMENTS]
Flags | Description | Environment variable | Default |
---|---|---|---|
--help
, -h | Prints help information |
| |
--meta
, -m | Event output includes the associated component_id as metadata. The actual event is nested under an event key. |
| |
--no-reconnect
, -n | Whether to reconnect if the underlying Vector API connection drops. By default, tap will attempt to reconnect if the connection drops. |
| |
--quiet
, -q | Quiet output includes only events. By default, diagnostic messages may appear on stderr. |
|
Options | Description | Environment variable | Default | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
--format
, -f | Encoding format for events printed to screen Enum options
| json | |||||||||
--inputs-of | Components (transforms, sinks) to observe for their inputs (comma-separated; accepts glob patterns) |
| |||||||||
--interval
, -i | Interval to sample events at, in milliseconds | 500 | |||||||||
--limit
, -l | Maximum number of events to sample each interval | 100 | |||||||||
--outputs-of | Components (sources, transforms) to observe for their inputs (comma-separated; accepts glob patterns) |
| |||||||||
--url
, -u | Vector GraphQL API server endpoint |
|
Arguments | Required | Description | Type | Default |
---|---|---|---|---|
components | false | Components (sources, transforms) to observe for their
outputs (comma-separated; accepts glob patterns). The
default value is * only if no other patterns are specified
(i.e. via --outputs-of or --inputs-of ); otherwise the
default value is empty. | list | * |
vector test
vector test [OPTIONS] [ARGUMENTS]
Options | Description | Environment variable | Default |
---|---|---|---|
--config-json | Read 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 | Read configuration from one or more files. Wildcard paths are supported. YAML file
format is assumed. | VECTOR_CONFIG_YAML |
|
Arguments | Required | Description | Type | Default |
---|---|---|---|---|
paths | false | Any number of Vector config files to test. If none are specified
the default config path /etc/vector/vector.toml will be targeted | list | /etc/vector/vector.toml |
vector top
vector top [FLAGS] [OPTIONS]
Flags | Description | Environment variable | Default |
---|---|---|---|
--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 |
| |
--no-reconnect
, -n | Whether to reconnect if the underlying Vector API connection drops. By default, top will attempt to reconnect if the connection drops. |
|
Options | Description | Environment variable | Default |
---|---|---|---|
--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
vector validate [FLAGS] [OPTIONS] [ARGUMENTS]
Flags | Description | Environment variable | Default |
---|---|---|---|
--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 |
|
Options | Description | Environment variable | Default |
---|---|---|---|
--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. |
|
Arguments | Required | Description | Type | Default |
---|---|---|---|---|
paths | false | Any number of Vector config files to validate. If none are specified
the default config path /etc/vector/vector.toml will be targeted | list | /etc/vector/vector.toml |
vector vrl
vector vrl [FLAGS] [OPTIONS] [ARGUMENTS]
Flags | Description | Environment variable | Default |
---|---|---|---|
--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 |
|
Options | Description | Environment variable | Default |
---|---|---|---|
--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 . |
|
Arguments | Required | Description | Type | Default |
---|---|---|---|---|
program | false | The program to execute. For example, ".foo = true" sets the object’s foo
field to true . | string | none |
Environment variables
AWS_ACCESS_KEY_ID
common optional string literalAWS_CONFIG_FILE
common optional string literal~/.aws/config
AWS_DEFAULT_REGION
common optional string literalAWS_PROFILE
common optional string literaldefault
AWS_ROLE_SESSION_NAME
common optional string literalAWS_SECRET_ACCESS_KEY
common optional string literalAWS_SESSION_TOKEN
common optional string literalAWS_SHARED_CREDENTIALS_FILE
common optional string literal~/.aws/credentials
DOCKER_CERT_PATH
common optional string literalPath 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.
DOCKER_CONFIG
common optional string literaltls
configuration and DOCKER_CERT_PATH
are absent.DOCKER_HOST
common optional string literaldocker_host
configuration is absent.GOOGLE_APPLICATION_CREDENTIALS
common optional string literalPROCFS_ROOT
common optional string literal/proc
by default.RUST_BACKTRACE
common optional boolSYSFS_ROOT
common optional string literal/sys
by
default.VECTOR_COLOR
common optional string literal enumauto
Option | Description |
---|---|
always | Always enable ANSI terminal formatting. |
auto | Detect ANSI terminal formatting and enable if supported. |
never | Disable ANSI terminal formatting. |
VECTOR_CONFIG
common optional string literal/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./etc/vector/vector.toml
VECTOR_CONFIG_DIR
common optional string literal.toml
, .json
, .yaml
, or .yml
are
ignored.VECTOR_CONFIG_JSON
common optional string literalVECTOR_CONFIG_TOML
common optional string literalVECTOR_CONFIG_YAML
common optional string literalVECTOR_INTERNAL_LOG_RATE_LIMIT
common optional uint10
VECTOR_LOG
common optional string literal enumINFO
Option | Description |
---|---|
DEBUG | Includes logs useful for debugging or troubleshooting Vector. The same as -v |
ERROR | Only show error logs. The same as -qq |
INFO | Include logs about Vector’s operation. This is the default. |
TRACE | Most verbose log level. Can be used for troubleshooting Vector. The same as -vv |
WARN | Include warnings. The same as -q |
VECTOR_LOG_FORMAT
common optional string literal enumtext
Option | Description |
---|---|
json | Output Vector’s logs as JSON. |
text | Output Vector’s logs as text. |