A short batch job pushes metrics into Pushgateway. Prometheus independently pulls from the gateway. A retained-data tray remains after the job ends, with explicit cleanup rather than automatic expiry.

Pushgateway retains batch metrics until their lifecycle is handled

A short-lived job can finish before Prometheus next scrapes it. Pushgateway offers an intermediary that retains pushed metrics for later scraping, but it is not the default answer for every short process. Prometheus recommends it primarily for suitable service-level batch outcomes. The retained data has a lifecycle independent of the job, so successful scraping does not prove the job recently ran or succeeded. ...

May 13, 2027 · 6 min · XB Field Notes