Skip to content

Linux Foundation Black Friday Sale: Up to 65% off Save now

Back to the blog
CNCF projects6 min read

What is Prometheus? Kubernetes monitoring explained

Sajeeva Nambadawa Vithanage23 Nov 2026 · Senior Software Site Reliability Engineer

What is Prometheus? It's the open-source monitoring and alerting toolkit that most Kubernetes clusters end up running, and the second project the CNCF ever took in, after Kubernetes itself. If you've seen /metrics on a service, or a Grafana dashboard full of rate(...) queries, you've already met it.

This post explains what Prometheus does, how it works, and how to try it in ten minutes. If you're studying for the Prometheus Certified Associate (PCA), or KCNA's observability questions, it covers the ideas you'll need. Our Prometheus project page lists everything else we've written about it.

Key points

  • What it is: a toolkit for metrics-based monitoring and alerting, storing numeric time series identified by a metric name and labels.
  • How it works: it pulls (scrapes) metrics over HTTP from your services, stores them locally, and lets you query them with PromQL.
  • Maturity: a CNCF graduated project. It joined as incubating on 9 May 2016 and graduated on 9 August 2018.
  • Latest release: Prometheus 3.16.0, published on 4 November 2026.
  • Certification: the Prometheus Certified Associate (PCA), a 90-minute multiple-choice exam.

What is Prometheus, and what problem does it solve?

Prometheus started at SoundCloud in 2012, when the team needed monitoring that could keep up with services that came and went all the time. Classic host-based tools expected a fixed list of servers. Microservices on Kubernetes don't work like that: Pods move, scale and restart, and their addresses change.

Prometheus answers that with three ideas. Every measurement is a time series with labels (job, instance, namespace, pod), so you can slice it any way you like. Targets are found through service discovery, including Kubernetes, rather than a hand-kept list. And each server runs on its own, with no dependence on distributed storage, so it keeps working when the rest of your platform is having a bad day. In the project's own words, it's "designed for reliability, to be the system you go to during an outage".

It isn't the right tool for everything. Prometheus collects numeric metrics, not logs or individual events, and the docs say plainly that if you need 100% accuracy, such as per-request billing, you should use something else for that data.

How Prometheus works

The parts of a typical setup:

  • The Prometheus server scrapes targets on a schedule, stores samples in its local time series database, and evaluates rules.
  • Client libraries let you instrument your own code (Go, Java, Python and others) and expose a /metrics endpoint.
  • Exporters translate metrics from things you can't instrument directly: Node Exporter for Linux hosts, and exporters for databases, proxies and more.
  • Alertmanager takes alerts fired by Prometheus, groups and deduplicates them, and sends them to email, chat or a pager.
  • Pushgateway is for short-lived batch jobs that end before they could be scraped.

The flow is simple: Prometheus pulls metrics from targets, stores them, runs recording and alerting rules, and sends firing alerts to Alertmanager. Grafana (or the built-in UI) queries Prometheus to draw dashboards.

A small Prometheus example

The getting-started guide in the docs uses a configuration like this one, which tells Prometheus to scrape itself:

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: "prometheus"
    scrape_interval: 5s
    static_configs:
      - targets: ["localhost:9090"]

Start it with:

./prometheus --config.file=prometheus.yml

Open http://localhost:9090 and try a few queries. The first returns a raw counter; the second turns CPU counters into a per-second rate over five minutes, averaged by instance and mode:

node_cpu_seconds_total
avg by (instance, mode) (rate(node_cpu_seconds_total[5m]))

(The node_cpu_seconds_total metric comes from Node Exporter, so add it as a second target to see data.)

An alerting rule looks like this. It fires when a target has been unreachable for five minutes:

groups:
  - name: availability
    rules:
      - alert: InstanceDown
        expr: up == 0
        for: 5m
        labels:
          severity: page
        annotations:
          summary: "{{ $labels.instance }} has been down for 5 minutes"

up is a series Prometheus records for every target it scrapes: 1 when the scrape works, 0 when it doesn't. It's one of the first things worth learning.

Prometheus on Kubernetes

On a cluster, most people don't write scrape configs by hand. The Prometheus Operator adds custom resources such as ServiceMonitor and PodMonitor, so you describe what to scrape with Kubernetes labels and the Operator generates the configuration. The kube-prometheus project packages the Operator, highly available Prometheus and Alertmanager, Node Exporter, kube-state-metrics and Grafana into one install.

Prometheus 3.0, released on 14 November 2024, also made life easier on modern stacks: a new UI, native support for receiving OpenTelemetry (OTLP) metrics, Remote Write 2.0, and UTF-8 metric and label names by default.

How Prometheus relates to similar projects

  • OpenTelemetry (CNCF graduated) is a standard and toolkit for producing telemetry: traces, metrics and logs. It doesn't store metrics itself. A common pattern is to instrument with OpenTelemetry and send the metrics to Prometheus over OTLP. See our OpenTelemetry page.
  • Thanos and Cortex (both CNCF incubating) build on Prometheus to add long-term storage and a global view across many Prometheus servers. You reach for them when one server's local storage isn't enough.
  • Grafana isn't a CNCF project, but it's the dashboard most teams put in front of Prometheus.

How to get started with Prometheus

  1. Run it locally with the config above, then add Node Exporter as a second target and explore its metrics.
  2. Learn PromQL properly. Counters versus gauges, rate() versus increase(), sum by and histograms. It's where most people get stuck.
  3. Write one alert and route it through Alertmanager to somewhere you'll see it.
  4. Install kube-prometheus on a test cluster and read the ServiceMonitor resources it creates.
  5. Bookmark our Prometheus page for related posts and the projects around it.

If you want a credential for it, the PCA is a 90-minute, online, proctored multiple-choice exam. Its domains are PromQL (28%), Prometheus Fundamentals (20%), Observability Concepts (18%), Alerting & Dashboarding (18%) and Instrumentation and Exporters (16%). The exam alone costs US$250, or US$299 with the LFS241 course. Check our PCA discount page and the LFS241 + PCA bundle before you book. The PCA also counts towards Golden Kubestronaut.

Pro tip: PromQL is 28% of the PCA, the biggest single domain. Run real queries against a real Prometheus every day of your preparation rather than only reading about them.

FAQ

What is Prometheus used for? Collecting numeric metrics from applications and infrastructure, querying them with PromQL, and alerting when something goes wrong. It's the default metrics system on most Kubernetes clusters.

Is Prometheus push or pull? Pull. Prometheus scrapes targets over HTTP. For short-lived batch jobs there's the Pushgateway, and since Prometheus 3.0 it can also receive OpenTelemetry metrics over OTLP.

What is the difference between Prometheus and Grafana? Prometheus collects and stores metrics and evaluates alerts. Grafana draws dashboards from data sources such as Prometheus. Most teams run both.

Is Prometheus a CNCF graduated project? Yes. It joined the CNCF on 9 May 2016 and graduated on 9 August 2018.

Is there a Prometheus certification? Yes: the Prometheus Certified Associate (PCA) from the Linux Foundation, a 90-minute multiple-choice exam with a two-year validity.

Sources

Start with the ten-minute local setup today, and write your first PromQL query before you open another tutorial.