scout config validate
Validate an OpenTelemetry Collector YAML configuration file without needing a running collector or Scout backend. Checks structure, component names, pipeline references, and best practices.

Usage
scout config validate [flags]
You can also pipe a config via stdin:
cat otel-collector.yaml | scout config validate
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--file | path | — | Path to the YAML config file. Reads from stdin if omitted |
--raw | bool | false | Output structured JSON instead of human-readable text |
Examples
Validate a config file:
scout config validate --file otel-collector-config.yaml
Validate from stdin:
cat otel-collector-config.yaml | scout config validate
Output structured JSON for CI integration:
scout config validate --file otel-collector-config.yaml --raw
Validation Stages
The validator checks your configuration in five stages:
- YAML parsing — syntax correctness
- Top-level structure — required sections (
service,pipelines, components) - Component names — checked against the otelcol-contrib registry (v0.111.0)
- Cross-reference integrity — pipeline references match defined components
- Best practices — unused components, missing health check extensions
Errors fail validation. Warnings are reported but don't affect the exit code.
Exit Codes
| Code | Meaning |
|---|---|
0 | Valid configuration (warnings allowed) |
1 | Validation errors found |
2 | I/O or usage error (file not found, no input) |
tip
Use exit codes in CI pipelines to gate deployments on valid configurations:
scout config validate --file otel-collector-config.yaml || exit 1
See Also
- config init — generate a configuration file
- config test — live-test a configuration
Was this page helpful?