Interview Prep/Monitoring & Observability/Scaling Prometheus, Long-Term Storage & HA

What is Prometheus agent mode and when do you use it?

IntermediateProductionScaling Prometheus, Long-Term Storage & HA
Answer

--agent mode (stable since Prometheus 2.32+) disables local querying, alerting and long-term TSDB; it only scrapes and remote-writes with a small WAL. Ideal for edge clusters that send everything to Mimir, Thanos Receive, VictoriaMetrics or a vendor.

prometheus --agent --config.file=prometheus.yml --storage.agent.path=/data

Grafana Alloy and the OpenTelemetry Collector's Prometheus receiver fill the same role. Alerting then runs in the central ruler.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Scaling Prometheus, Long-Term Storage & HA