Validating

Vector provides a subcommand, validate, which checks the validity of any number of configuration files and then exits:

vector validate /etc/vector/vector.toml

The validate subcommand checks the correctness of fields for components defined within a configuration file, including:

  1. That sources, transforms, and sinks include all non-optional fields.
  2. All fields are of the proper type.

The following group of checks verifies that the configuration file contains a valid topology, and can be disabled with flags such as --no-topology, expanding the above checks with the following:

  1. At least one source is defined.
  2. At least one sink is defined.
  3. All inputs values contain at least one value (cannot be empty).
  4. All inputs values reference valid and upstream source or transform components.

The following group of checks require the runtime environment to pass successfully, and can be disabled with flags such as --no-environment, expanding the above checks with the following:

  1. All components are capable of running, for example that data directories exist and are writable, etc.
  2. All sinks are able to connect to their targets.

If validation fails, Vector will exit with an exit code of 78, and if validation succeeds Vector will exit with an exit code of 0.

To see other customization options for the validate subcommand run vector validate --help.