How to Design Useful Alerts Without Fatigue
Alert on symptoms, not causes: use a sustained condition, tie each alert to an action, and reduce noise so every alert is actionable.
On this page
Introduction
An alert is a request for a human to act. An alert that fires without requiring an action trains the responder to ignore it, and an ignored alert is worse than none, because the real one is lost in the noise. Useful alerting is a discipline: alert on the symptom the user feels, require the condition to be sustained, tie each alert to an action, and keep the set small enough that every alert is trusted.
This tutorial covers alerting on a symptom, requiring a sustained condition, making each alert actionable, and testing and pruning the set. The examples use metrics-based alert rules, and the principles apply to any alerting system.
Alert on the symptom, not the cause
A symptom is what the user experiences: a request fails, a request is slow, a page does not load. A cause is an internal condition that may or may not produce a symptom: high CPU, a large queue, a connection count. Alert on the symptom, because it is what warrants a response, and keep the cause metrics for the dashboard that explains the symptom when it fires.
This split is what makes the alert set manageable. There are many causes and few symptoms, so alerting on symptoms keeps the set small. It also avoids paging for a cause that turns out harmless, which is the most common source of fatigue. The responder pages on what the user feels and then looks at the causes to find why.
# symptom alert: the user sees errors
sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m])) > 0.02
# not an alert: a cause that may not affect users
avg(rate(container_cpu_usage_seconds_total[5m])) > 0.8 # dashboard only
Require a sustained condition
A single sample above a threshold is noise; a condition that holds for a window is a signal. Add a duration, such as five minutes, before the alert fires, so a brief spike that recovers does not page. The window should reflect the impact: a five-minute error rate above the budget is an incident, while a one-second spike is not.
A related technique is multi-window alerting: a fast window to catch a severe condition quickly and a slow window to confirm, so a sharp spike pages fast and a slow drift still pages, without the fast window paging on noise. The point is that the alert fires on a sustained condition, which is what distinguishes a real problem from a momentary one.
alert: HighErrorRate
expr: sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m])) > 0.02
for: 5m # the condition must hold for 5 minutes before firing
labels: { severity: page }
annotations:
runbook: https://wiki/runbooks/high-error-rate
Make every alert actionable and owned
An alert should name what to do: a runbook, a dashboard to open, a first diagnostic step. An alert with no action is a notification, not an alert, and it belongs on a dashboard instead. Include the runbook link and a short description so the responder, who may be woken at night, knows where to start.
Give each alert an owner and a severity. The owner is who fixes it, and the severity decides whether it pages. A warning that does not page is a ticket or a dashboard, and only a condition that warrants a page is a page. This classification keeps the paging set small and the responders’ trust high, because every page requires a response.
# severity decides the routing: page vs ticket vs dashboard
# page: the user is affected now and a response is required
# ticket: a condition to fix, but not urgent
# dashboard: a cause to look at when a symptom fires
Test that the alert fires and resolves
Test that the alert fires when the condition holds and resolves when it clears, by driving the metric over the threshold in a test environment and asserting the rule fires, then driving it back and asserting it resolves. An alert that never fires or never resolves is broken, and a broken alert is discovered only when the incident it should have caught is missed.
Test the alert against the scenario it is meant to catch: inject the failure the alert targets and assert it fires within the intended window. This connects the alert to the incident it covers, so a change that removes the signal or the failure breaks the test. An alert with a test is a maintained alert; one without drifts until it fires for nothing or not at all.
# in a staging environment, inject the failure and assert the alert fires
# then clear it and assert the alert resolves within the window
node scripts/inject-failure.mjs error-rate
sleep 360
node scripts/assert-alert.mjs HighErrorRate firing
Prune the alerts that are not actioned
Every alert that fires and does not lead to a response is a candidate for deletion or downgrade. Review the alerts by their action rate: an alert that has fired ten times and led to no action is noise, and it belongs on a dashboard or should be removed. The pruning keeps the set trustworthy, so a page is taken seriously.
Track the alert volume and the fraction actioned, so the trend is visible. A rising volume with a falling action rate is a fatigue problem, which leads to missed incidents. Keep the paging set to the alerts that warrant a page, and move the rest to a lower severity, so the responder’s attention is spent where a response is required.
Test the alert rules themselves
Test the alert rule expression with a known series that should fire and one that should not, so the threshold and the window are checked. Test that the runbook link is present and resolves, so the responder has an action. Test that the severity matches the routing, so a page is routed to the pager and a warning is not.
# unit-test the alert expression with synthetic series
# a series above the threshold for the window must fire; one below must not
promtool test rules alert-tests.yml
Common pitfalls
Alerting on causes that do not affect users, firing on a single spike, an alert with no runbook or owner, alerting on everything so the set is noisy, and never pruning the alerts that are not actioned are the recurring mistakes. Symptom alerts, a sustained window, a runbook and owner per alert, a small paging set, and a pruning review address them.
Conclusion
An alert is a request for a human to act, so it must be worth the action. Alert on the symptom the user feels, require the condition to hold for a window, give each alert a runbook and an owner, and prune the ones that are not actioned. Self-check by injecting the failure and asserting the alert fires within the window and resolves after. Then every page is trusted, and the real incident is not lost in the noise.
Sources: Google SRE: Alerting on SLOs, Prometheus: Alerting best practices, My Philosophy on Alerting (Rob Ewaschuk).
FAQ
- Why not alert on CPU usage?
- CPU usage is a cause, and a high CPU may not affect users at all. Alerting on it pages for a condition the user does not feel. Alert on the symptom, the slow response or the error rate, and use the cause metrics on a dashboard to explain it when the symptom fires.
- How do I reduce alert noise?
- Require the condition to hold for a window, tie each alert to a user-visible symptom and a runbook, and delete the alerts that never lead to an action. Every alert a responder receives should require a response; if it does not, it trains them to ignore alerts.
Report a problem with this articleOpens a pre-filled issue on GitHub.