Skip to main content
This lesson introduces Prometheus: an open-source monitoring system designed to collect, store, and query numeric time-series metrics. Below you’ll find a concise overview of Prometheus’ core functionality, how it gathers metrics, common integrations, and practical examples (scrape endpoints, PromQL, and alert rules) to help you get started.

What is Prometheus?

Prometheus is a monitoring and alerting toolkit that focuses on numeric time-series data. It provides:
  • Metric collection by scraping HTTP endpoints that expose plaintext metrics (typically a /metrics endpoint).
  • A time-series database that stores scraped data efficiently.
  • A powerful query language, PromQL, for aggregations, filtering, and creating dashboards.
  • Alerting rules that produce alerts which can be routed to Alertmanager for notifications and deduplication.
Key use cases:
  • System-level metrics (CPU, memory, disk).
  • Service-level metrics (request counts, error rates, service uptime).
  • Application-specific metrics (latency histograms, exception counters, queue lengths).
Prometheus primarily uses a pull model: it periodically sends HTTP GET requests to configured targets and ingests the metrics those endpoints return. For short-lived jobs or special cases you can use a push model through the Pushgateway — see the Prometheus docs for guidance on when to use it: https://prometheus.io/docs/practices/pushing/. Example: typical metrics endpoint
A presentation slide titled "Prometheus" listing the types of metrics it can monitor: CPU/memory utilization, disk space, service uptime, and application-specific data such as number of exceptions, latency, and pending requests.

How Prometheus integrates with systems

Prometheus collects metrics from many sources by scraping or via exporters. Common exporters and integrations include:
  • node_exporter — host and OS metrics (CPU, memory, disk).
  • blackbox_exporter — probing endpoints (HTTP, TCP, ICMP).
  • Database exporters — PostgreSQL, MySQL, MongoDB, etc.
  • Cloud/service-specific exporters for third-party systems and devices.
These exporters expose metrics in Prometheus’ text format, so Prometheus can scrape them uniformly.

Metric types and what to monitor

Prometheus supports several native metric types:
  • Counter — monotonically increasing value (e.g., request count).
  • Gauge — point-in-time value that can go up or down (e.g., memory usage).
  • Histogram — samples and buckets for latency distributions.
  • Summary — quantiles over a sliding time window.
Use Prometheus for numeric time-series metrics only. For logs or traces, use specialized systems.
Prometheus is designed for numeric time-series metrics (counters, gauges, histograms, summaries). For log collection or distributed tracing, use dedicated tools like Elasticsearch, Loki, Jaeger, or Zipkin.
A slide titled "Prometheus" saying it monitors numeric time-series data. It asks what Prometheus should not monitor, listing "Events," "System logs," and "Traces."

Quick examples

Prometheus scrape configuration (prometheus.yml)
Example PromQL queries
Sample alerting rule

Component overview

Historical and implementation notes

  • Originally developed at SoundCloud; joined the Cloud Native Computing Foundation (CNCF) as a project in 2016 and later graduated.
  • Implemented primarily in Go.
  • Official docs and getting started guides: https://prometheus.io/docs/

Next steps

In upcoming lessons we will cover:
  • Prometheus data model in depth (labels, metric types).
  • Configuring scrape targets, relabeling, and exporters.
  • Writing effective PromQL queries and visualizing with Grafana.
  • Creating robust alerting rules and integrating Alertmanager.
Further reading and resources:

Watch Video