RousselTMLEARNING

Observability

Alerting best practices: Prometheus, Alertmanager and on-call

Checklist for effective alerting: symptom-based rules, severities, routing by team, noise reduction, high availability, tests and alert reviews.

1. Designing alerts #

Fewer, but better.

Principles #

  • Alert on symptoms seen by the user (errors, latency, saturation), ideally based on SLOs.
  • Three severities at most: critical (wakes people up), warning (business hours), info (no notification).
  • A team label on every alert, a runbook_url on every critical alert.
  • A for of at least a few minutes to avoid noise.
  • Rules tested with promtool test rules in CI.

2. Routing and reducing noise #

The right message to the right person.

Settings #

  • group_by on alertname and cluster (or service), never on instance for fleet alerts.
  • Inhibitions for cascading failures (unreachable cluster, node down).
  • mute_time_intervals for warnings at night and on weekends.
  • Short, targeted, commented silences.
  • Secrets in files (*_file), configuration validated by amtool check-config in CI.

3. Alerting reliability #

Alerting is a critical service.

Checklist #

  • A cluster of 2 or 3 Alertmanagers, Prometheus configured to send to all members.
  • Watchdog to an external dead man's switch.
  • Alert on alertmanager_notifications_failed_total.
  • Weekly review: rate of actionable alerts, noisiest alerts, alerts that never fire.

Reference diagram and quick check #

Before going to production.

Check #

  1. Each team has its route and receiver
  2. Critical alerts go to the on-call tool
  3. Warnings are muted at night
  4. Watchdog in place
  5. Rules and routes tested in CI
  6. Runbooks reachable from the notification

Related articles

Alertmanager: role, architecture and lifecycle of an alert

What Alertmanager does between Prometheus and your teams: deduplication, grouping, routing, silences and inhi…

Writing good Prometheus alerting rules (and testing them)

Design useful alerts: alert on symptoms, choose for and thresholds, severity and team labels, annotations and…

Routing, grouping and receivers in Alertmanager

The Alertmanager routing tree: matchers, group_by, group_wait, group_interval, repeat_interval, continue, rec…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!