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.
More on Alerting Strategy, SLOs & Runbooks
What is the single most important rule for deciding whether an alert should page a human?BeginnerWhat severity levels do you define, and where does each one go?BeginnerWhy do mature teams alert on SLO burn rate instead of raw error rate thresholds?IntermediateIn a multi-window burn-rate alert, what is the short window for?AdvancedHow do you generate SLO alert rules without hand-writing dozens of burn-rate expressions?IntermediateHow do you pick an SLO target for a service that has never had one?Beginner