How do you alert on something that should be happening but is not (absence of data)? [Intermediate]
Answer
To alert on something that should be happening but is not, I use absence checks, stale timestamp gauges, or expected-rate checks. The safest pattern is often a last_success_timestamp metric for jobs and pipelines.
Technical explanation
absent() is useful when an entire metric or target disappears, but it must be scoped carefully.
For cron jobs, export last success time and alert when it is too old.
For event streams, alert on rate below expected baseline only when the business schedule says traffic should exist.
Hands-on example
PromQL examples: absent(up{job='checkout'} == 1) detects missing targets. For a cron: time() - batch_last_success_timestamp_seconds{job='billing-reconcile'} > 26*3600. For Kafka: rate(events_consumed_total[15m]) == 0 during business hours.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Observability interview questions
- What is the Prometheus Operator, and what are ServiceMonitor and PodMonitor? [Intermediate]
- How does Prometheus integrate with Kubernetes service discovery? [Intermediate]
- What is the difference between Thanos and Cortex/Mimir at a high level? [Intermediate]
- What is the Splunk data pipeline (input, parsing, indexing, search)? [Intermediate]
- How does Prometheus storage (TSDB) work, and what is the retention model? [Intermediate]
- What is the difference between a Splunk forwarder, indexer, and search head? [Intermediate]
- How does Prometheus handle high cardinality, and why is it a problem? [Intermediate]
- What is the difference between a universal and a heavy forwarder? [Intermediate]