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.
More on PromQL and recording rules
A PromQL query in the UI returns `Empty query result` for a metric you can see on `/metrics`Beginner`rate(http_requests_total[1m])` returns nothing but `http_requests_total` has dataBeginner`rate()` applied to a gauge shows huge spikesBeginnerBinary operation fails: `many-to-many matching not allowed: matching labels must be unique on one side`Advanced`found duplicate series for the match group {pod="api-1"} on the right hand-side of the operation`IntermediateError ratio query returns no data during quiet hoursIntermediate