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.
More on Scaling Prometheus, Long-Term Storage & HA
What are the practical limits of a single Prometheus server?IntermediateWhen does hierarchical federation still make sense?IntermediateHow do you shard Prometheus scraping, and what do you lose?AdvancedCompare Thanos, Grafana Mimir and VictoriaMetrics.AdvancedThanos sidecar versus Thanos Receive: how do you choose?AdvancedHow do you tune `remote_write` for high throughput?Advanced