Prometheus Alerting Rules: Writing Tests and CI Validation
Write test files that inject metric values over time and assert which alerts fire, when, and with what labels. Run promtool test rules in CI to catch bad thresholds and typos before they reach production....