Alerting
Notifying people when something needs attention.
Good alerts fire on symptoms users feel, are actionable and are rare. Noisy alerts get ignored, which is worse than no alerts. Alerting on SLOs is a common way to keep them meaningful.
Why it matters for a product engineer
An alert should mean that a person needs to act now. When alerts fire for things nobody needs to fix, people learn to ignore them, and then they miss the one that matters. Good alerting is a product decision as much as a technical one: it encodes what “broken for users” means, and who must wake up for it.
How to do it
- Alert on symptoms users feel, such as errors and slow responses, not on every possible cause.
- Tie alerts to your service level objectives, so an alert means the error budget is at risk.
- Use two speeds: fast burns page someone, slow burns become a ticket.
- Give every alert an owner and a short note: what it means and the first step.
- Send everything else, such as single errors and warnings, to a place people read during the day.
- Review alerts every month. Remove or fix every alert that fired without action.
Common mistakes
- Paging on CPU or memory when users notice nothing.
- One channel where alerts, logs and messages mix.
- Alerts with no owner.
- Thresholds so sensitive that people silence them.
Example
Mamitsu’s maker does not watch his error tracker. An agent checks Sentry all the time, and for each new error it opens a Slack thread: is it a real error, and does it need him? Sometimes the agent has a fix ready before he has read the thread. (Mamitsu in In practice)
When Google's SRE workbook suggests alerting, for a 30-day SLO
- 2% of the budget used in 1 hour: page14.4 × normal rate
- 5% used in 6 hours: page6 × normal rate
- 10% used in 3 days: ticket1 × normal rate
Each bar is the burn rate: how much faster than normal the budget is being used. Fast burns wake someone up. Slow burns can wait until morning.
ReportedThe Site Reliability Workbook, chapter 5, suggested starting values
Sources: Alerting on SLOs (The Site Reliability Workbook, chapter 5) ↗ · Monitoring distributed systems (Site Reliability Engineering, chapter 6) ↗
In practice
Real productsResources
2- bookStart here
Monitoring distributed systems (Site Reliability Engineering, chapter 6) ↗
Google SRE · 20 minThe four golden signals and the case for alerting on symptoms users feel rather than on every cause.
- bookGo deeper
Alerting on SLOs (The Site Reliability Workbook, chapter 5) ↗
Google SRE · 20 minBurn-rate alerts that page people only when users are actually at risk.
Tools
1- ToolOpen source
Prometheus
Open-source metrics database and alerting, the common default for service metrics.