promtool check rules /etc/prometheus/rules.yml

Category: Monitoring & Observability

promtool check rules /etc/prometheus/rules.yml

Validate Prometheus recording and alerting rules

Checks rule files for valid PromQL expressions, correct YAML, and sane structure. It flags rules that never fire and expressions that reference missing metrics. Run it in CI before deploying new alerting rules.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.