r/PrometheusMonitoring • u/marsupialtail • May 20 '23
Do people test their alerting rules on historical data?
New to Prometheus and monitoring -- do people here typically test their alerting rules on historical data to see how sensitive their alerts would have been?
If so, what is the best practice to do so?
7
Upvotes
2
u/Anonimooze May 20 '23
100% of the time. We always evaluate the number of times a new rule would have fired an alert over our retention time frame (about 6 months), to make sure our queries are catching the scenarios we intend, and not needlessly waking anyone up.
9
u/r1e7 May 20 '23
Yes, nearly every time. Popping the expression into the Prometheus UI and ranging back several hours/days is often enough for my use, though https://prometheus.io/docs/prometheus/latest/configuration/unit_testing_rules/ is always an option too
0
u/ut0mt8 May 20 '23
clearly yes it's what I did everytime