An alert flaps between firing and resolved every few minutes. What do you do?
IntermediateScenarioAlerting and On-Call Design
Answer
Situation read → The expression hovers around the threshold, or the metric is noisy.
What I'd do →
- Check the expression in the Prometheus graph view with a 6h range to see the oscillation.
- Increase
for:so a short blip does not fire (e.g.for: 10m). - Smooth the input: use
avg_over_time(x[10m])or a longerrate()window. - Use
keep_firing_for: 15m(Prometheus 2.42+) so a firing alert stays active briefly after the condition clears. - Consider hysteresis: different thresholds to fire and clear using two rules.
Why → for: filters short spikes, keep_firing_for prevents resolve/fire churn that spams receivers.
Interview tip → Distinguish for (delay before firing) from keep_firing_for (delay before resolving).
More on Alerting and On-Call Design
Your on-call engineers receive 300 alerts a night and have started ignoring the pager. How do you fix it?IntermediateYou are asked to design alerting for a brand-new HTTP service from scratch. What do you alert on?BeginnerA "CPU above 90%" alert wakes someone at 3 a.m., but users saw no impact. What do you change?BeginnerA new hire asks: "Should we page on symptoms or causes?" How do you answer with an example?BeginnerDesign burn-rate alerts for a 99.9% availability SLO over 30 days.AdvancedPayments and platform teams share one Prometheus and one Alertmanager. How do you route alerts to the right team and severity?Intermediate