How to start, stop, reload, and restart your Vector instance
The sections below show you how to administer your Vector instance—start, stop, reload, etc.—in a variety of settings:
- Vector executable (no process manager)
- Linux (systemctl process manager)
- macOS (Homebrew service manager)
- Kubernetes with Helm
To manage the Vector executable directly, without a process manager:
killall -s SIGHUP vector
vector --config /etc/vector/vector.toml # Or supply a JSON or YAML config file
APT, dpkg, RPM, YUM, pacman
If you’ve installed Vector using APT, dpkg, RPM, YUM or pacman, you can manage it using systemctl.
systemctl kill -s HUP --kill-who=main vector.service
sudo systemctl restart vector
sudo systemctl start vector
sudo systemctl stop vector
If you’ve installed Vector using Nix, you can manage it using the commands laid out in the Vector executable section.
If you’re running Vector on macOS, you can manage it using either the executable commands or Homebrew.
If you’ve installed Vector using Homebrew, you can manage it using Homebrew’s services utility.
killall -S SIGHUP vector
brew services restart vector
brew services start vector
brew services stop vector
If you’re running Vector on Windows (perhaps you installed it using MSI), you can manage it using these commands:
C:\Program Files\Vector\bin\vector \ --config C:\Program Files\Vector\config\vector.toml # Or supply a JSON or YAML config file
If you’re running Vector using Docker, the command interface is the same across all platforms.
docker kill --signal=HUP timberio/vector
docker restart -f $(docker ps -aqf "name=vector")
docker run \ -d \ -v ~/vector.toml:/etc/vector/vector.toml:ro \ -p 8686:8686 \ timberio/vector:0.30.0-alpine
docker stop timberio/vector
The commands above involve configuring Vector using TOML, but you can also use JSON or YAML. You can also use one of
three image variants (the commands assume
|Alpine, a Linux distro built around musl libc and BusyBox|
|The Distroless project, which provides extremely lean images with no package managers, shells, or other inessential utilities|
To get Vector running on Kubernetes using the Helm package manager:
Once Vector is running in Kubernetes, you can manage it using kubectl:
kubectl rollout restart --namespace vector daemonset/vector-agent
kubectl rollout restart --namespace vector statefulset/vector-aggregator
As you can see above, many administrative interfaces for Vector enable you to trigger a restart of a Vector instance while it’s running. There are a few things that you should know about reloading.
Automatic reloading on configuration change
You can make Vector automatically reload itself when its configuration file changes by setting the
-w flag when you first start your Vector instance.
How it works
Running Vector instances accept the IPC signals and produce the exit codes listed below.
|Reloads configuration on the fly.|
|Initiates graceful shutdown process.|
exitcodesRust crate. Vector uses the codes listed in the table below.
|Exited with a generic error.|
|Configuration is invalid.|