What is staleness in Prometheus?
AdvancedConceptPrometheus Architecture
Answer
When a target disappears or a series is no longer exposed, Prometheus writes a special stale marker (a NaN) so queries stop returning that series immediately instead of showing the last value. If no stale marker exists (for example data pushed via remote_write or a scrape gap), an instant query looks back at most --query.lookback-delta (default 5m) for the latest sample.
That is why a dead pod's series vanishes from graphs right away, and why gaps longer than 5 minutes show as missing data.
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced