All jobs / DevOps / SRE / cloud / Observability

DevOps / SRE / cloud interview question · 1–3 years

How does Prometheus collect metrics, and why does a thirty-second batch job show none?

The strongest answer

Prometheus pulls: it scrapes each target’s /metrics endpoint on an interval, using service discovery; a job that exits in thirty seconds may never be scraped, so it pushes to the Pushgateway or reports through a long-lived collector

Why it works

Right — the pull model is the design choice everything else follows from, including how short-lived work is handled.

What a good answer covers

Answers that fall short

Who gets asked this

More Observability questions