Interview Prep/Monitoring & Observability/Alerting Strategy, SLOs & Runbooks

How do you write alerts that survive a missing metric or a scrape failure?

IntermediateProductionAlerting Strategy, SLOs & Runbooks
Answer

An expression over a series that disappears returns nothing, so the alert quietly resolves. Guard against it:

# Fire if the target is down
up{job="payments"} == 0

# Fire if the metric vanished entirely
absent(up{job="payments"})

# Fire if a metric stopped updating
absent_over_time(payments_processed_total[15m])

Pair each critical SLO alert with an absence alert, and keep a global "target down" ticket rule. Otherwise a broken exporter looks exactly like a healthy service.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting Strategy, SLOs & Runbooks