Interview Prep/Monitoring & Observability/PromQL and recording rules

Stale series keep showing on a graph for 5 minutes after a pod is deleted

BeginnerTroubleshootingPromQL and recording rules
Answer

Likely causes → Lookback delta (default 5m) or the target was removed without a stale marker (e.g. Prometheus restarted at the same time).

Diagnose → Check if the line flattens then ends ~5m later.

Fix → Usually normal. Prometheus writes stale markers when a target disappears from SD, so series end quickly; if not, reduce --query.lookback-delta carefully.

Prevent → Understand lookback before tuning it; shorter values break sparse metrics.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on PromQL and recording rules