Prometheus Architecture#
Prometheus pulls metrics from targets at regular intervals (scraping). Each target exposes an HTTP endpoint (typically /metrics) that returns metrics in a text format. Prometheus stores the scraped data in a local time-series database and evaluates alerting rules against it. Grafana connects to Prometheus as a data source and renders dashboards.
Scrape Configuration#
The core of Prometheus configuration is the scrape config. Each scrape_config block defines a set of targets and how to scrape them.