Prometheus Architecture

Prometheus Architecture An architecture diagram generated by Archify. Jobs / Exporters · /metrics endpoint · Scrape Targets Jobs / Exporters /metrics endpoint Short-lived Jobs · batch / cron · Scrape Targets Short-lived Jobs batch / cron Pushgateway · relays pushed metrics · Scrape Targets Pushgateway relays pushed metrics Service Discovery · K8s · DNS · File · Consul · Architecture component Service Discovery K8s · DNS · File · Consul Retrieval · metric collection (pull) · Prometheus Server Retrieval metric collection (pull) TSDB · time series DB · Prometheus Server TSDB time series DB HTTP Server · query API (PromQL) · Prometheus Server HTTP Server query API (PromQL) Alert Rules · alert rule evaluation · Prometheus Server Alert Rules alert rule evaluation Visualization / API · Grafana · API · UI · Architecture component Visualization / API Grafana · API · UI Alertmanager · grouping · routing · Architecture component Alertmanager grouping · routing Notification Channels · Email · Slack · PagerDuty · Architecture component Notification Channels Email · Slack · PagerDuty discover scrape push scrape store read evaluate PromQL alerts route Prometheus Server Scrape Targets

Collection

  • • Discover scrape targets via service discovery (Kubernetes API, DNS, files, etc.)
  • • Scrape metrics from each target's /metrics endpoint over HTTP (pull)
  • • Short-lived jobs push to the Pushgateway, which Retrieval scrapes in turn

Storage and Query

  • • Store collected metrics in the local TSDB
  • • Serve PromQL queries over the HTTP API to Grafana, API clients, and the Prometheus UI

Alerting

  • • Evaluate alert and recording rules against stored data
  • • Send fired alerts to Alertmanager, which routes them to Email · Slack · PagerDuty