Prometheus Architecture Components
What you'll learn: How Prometheus's modular architecture pieces work together to collect, store, and alert on metrics.
Now that you understand what Prometheus is, let's explore the four key components that make up a complete monitoring stack.
The Prometheus Server
Think of this as the brain—it scrapes (pulls) metrics from targets at regular intervals, stores time-series data locally, and evaluates alerting rules. It runs the PromQL query engine and exposes an HTTP API for queries and visualization tools.
Exporters
Exporters are the translators. They expose metrics from systems that don't natively speak Prometheus format. For example, node_exporter collects Linux host metrics (CPU, memory, disk), while blackbox_exporter probes endpoints for availability. Each exporter runs an HTTP endpoint that the Prometheus server scrapes.
Pushgateway
Some short-lived jobs (batch scripts, cron tasks) finish before Prometheus can scrape them. The Pushgateway acts as a holding area—these jobs push their metrics here, and Prometheus scrapes the gateway. It's meant for edge cases, not continuous metrics.
Alertmanager
Once Prometheus detects rule violations (CPU > 90% for 5 minutes), it fires alerts to Alertmanager. This component handles deduplication, grouping, silencing, and routing alerts to receivers like email, Slack, or PagerDuty. It separates monitoring logic from notification complexity.
How They Connect
The flow: Exporters and applications expose metrics → Prometheus server scrapes them → Prometheus evaluates rules → Alerts go to Alertmanager → Notifications reach your team.
Key Takeaway:
Prometheus uses a modular architecture: the server scrapes metrics from exporters and targets, Pushgateway handles ephemeral jobs, and Alertmanager manages alert routing and notifications.