Describe the Prometheus architecture.
BeginnerConceptPrometheus Architecture
Answer
flowchart LR
SD["Service discovery"] --> P["Prometheus server"]
T["Targets and exporters"] -->|"scrape /metrics"| P
PG["Pushgateway"] -->|"scrape"| P
P --> TSDB["Local TSDB"]
P -->|"alerts"| AM["Alertmanager"]
P -->|"remote_write"| LTS["Thanos / Mimir"]
G["Grafana"] -->|"PromQL"| P
AM --> N["Slack / PagerDuty / Email"]
The server discovers targets, scrapes them over HTTP, stores samples in its local TSDB, evaluates recording and alerting rules, and sends firing alerts to Alertmanager. Grafana and the HTTP API query it with PromQL.
More on Prometheus Architecture
What does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?AdvancedHow do you configure Prometheus retention?Beginner