promtool check config
promtool check config <prometheus.yml>
Risk: Safe
What it does
Checks prometheus.yml, and the rule files it names, before you load them.
When to use it
Every time you change prometheus.yml.
Example
$ docker compose exec prometheus promtool check config /etc/prometheus/prometheus.ymlpromtool lives inside the Prometheus image. SUCCESS means the file is fine.
Learn it in: Scraping and targets · Official docs