The gap pull leaves
A pull based server scrapes long running targets, but a short lived batch job may start and finish between scrapes, so its metrics are never read. The push gateway pattern bridges this gap.
How it works
- The batch job pushes its final metrics to the gateway before exiting.
- The gateway holds the most recent pushed values.
- The metrics server scrapes the gateway like any other target.
The job is decoupled from scrape timing; the gateway becomes a durable place its last values live.
Use it sparingly
The gateway is meant for service level batch jobs, not for turning the whole system into a push pipeline.
- It does not track liveness of the original job.
- Stale values persist until explicitly deleted, so old jobs can linger.
- Group by a job identity so pushes overwrite cleanly.
Key idea
A push gateway lets short lived jobs push final metrics to a holding endpoint the server scrapes, bridging ephemeral work into a pull model without overusing push.