Basic Usage
Global Options
These options apply to all commands and control Vector’s runtime behavior:Configuration
Read configuration from one or more files. Wildcard paths are supported. File format is detected from the file name.Environment:
VECTOR_CONFIGRead configuration from files in one or more directories. Files not ending in Environment:
.toml, .json, .yaml, or .yml are ignored.VECTOR_CONFIG_DIRRead configuration from TOML files.Environment:
VECTOR_CONFIG_TOMLRead configuration from JSON files.Environment:
VECTOR_CONFIG_JSONRead configuration from YAML files.Environment:
VECTOR_CONFIG_YAMLRuntime Options
Number of threads to use for processing. Defaults to the number of available CPU cores.Environment:
VECTOR_THREADSExit on startup if any sinks fail healthchecks.Environment:
VECTOR_REQUIRE_HEALTHYWatch for changes in configuration files and reload accordingly.Environment:
VECTOR_WATCH_CONFIGMethod for configuration watching: Environment:
recommended or poll. Defaults to recommended (uses inotify on Linux, kqueue on macOS). Use poll for network filesystems like NFS.VECTOR_WATCH_CONFIG_METHODPoll interval in seconds when using Environment:
poll watch method. Default: 30 seconds.VECTOR_WATCH_CONFIG_POLL_INTERVAL_SECONDSLogging Options
Enable more detailed internal logging. Can be repeated to increase level.Levels:
-v = debug, -vv = traceReduce detail of internal logging. Repeat to reduce further. Overrides Levels:
--verbose.-q = warn, -qq = error, -qqq = offSet the logging format: Environment:
text or json. Default: text.VECTOR_LOG_FORMATControl ANSI terminal formatting: Environment:
auto, always, or never. Default: auto.VECTOR_COLORSet the internal log rate limit in seconds. Default: 10 seconds.Environment:
VECTOR_INTERNAL_LOG_RATE_LIMITShutdown Options
Duration in seconds to wait for graceful shutdown after SIGINT or SIGTERM. Default: 60 seconds.Environment:
VECTOR_GRACEFUL_SHUTDOWN_LIMIT_SECSNever time out while waiting for graceful shutdown. Vector will attempt to send data until terminated by SIGKILL.Environment:
VECTOR_NO_GRACEFUL_SHUTDOWN_LIMITAdvanced Options
Disable interpolation of environment variables in configuration files.Environment:
VECTOR_DISABLE_ENV_VAR_INTERPOLATIONDisable probing and configuration of root certificate locations for OpenSSL. Useful when using the Environment:
exec source.VECTOR_OPENSSL_NO_PROBEAllow the configuration to run without any components. Useful with Environment:
--watch-config for dynamic configuration loading.VECTOR_ALLOW_EMPTY_CONFIGAvailable Commands
Vector provides several subcommands for different operations:validate
Validate configuration files
test
Run unit tests for your configuration
graph
Output topology as visual representation
top
Display topology and metrics in real-time
generate
Generate configuration from templates
list
List available components
convert-config
Convert configuration between formats
Examples
Start Vector with Configuration
Start with Multiple Configs
Run with Debug Logging
Watch Configuration for Changes
Run with Custom Thread Count
Require Healthy Sinks on Startup
Exit Codes
Vector uses standard exit codes:0- Success1- Generic error78- Configuration error
Environment Variables
All command-line options can be set via environment variables. See individual option descriptions for the corresponding environment variable names. Example:Signal Handling
Vector responds to the following signals:- SIGINT / SIGTERM - Initiates graceful shutdown
- SIGHUP - Reloads configuration (if
--watch-configis not used) - SIGKILL - Forces immediate termination (not recommended)
Next Steps
Commands Reference
Detailed reference for all CLI commands
Configuration
Learn how to configure Vector