website/content/en/docs/administration/validating.md
Vector provides a subcommand, validate, that checks the validity of your Vector configuration and exits.
Here's an example:
vector validate /etc/vector/vector.yaml
You can also check multiple files:
vector validate /etc/vector/vector*.toml
The validate subcommand performs several sets of checks on the configuration you point
it to. If validation succeeds, Vector exits with a code of 0; if it fails, it exits with a code of
78. At any time, you can see documentation for the command by running vector validate --help.
These checks verify the correctness of fields for components defined within all configuration files, including:
These checks verify that the configuration file contains a valid topology:
inputs parameter) contain at least
one value.Finally, these checks ensure that Vector is running in an environment that can support the configured topology:
These environment checks can be disabled using the --no-environment flag:
vector validate --no-environment /etc/vector/vector.yaml
To validate the vector configuration even if the health-checked endpoints are not reachable
(for example, from a local workstation), but still run all the other environment checks, use
the [--skip-healthchecks][skip_healthchecks] flag:
vector validate --skip-healthchecks /etc/vector/vector.yaml
Note: The configured data_dir must still be writeable.