What is Prometheus?

In short
Prometheus is an open-source toolkit that collects numbers describing how software and servers behave, stores them over time, and sends alerts when something looks wrong. It is widely used for monitoring modern systems, especially microservices running in containers and clusters.
How it works
Prometheus works by collecting metrics. A metric is a number that describes something about your system, such as how many requests a web server handled or how many connections a database has open. Prometheus stores each value together with the time it was recorded. A series of values recorded over time is called a time series.
Each stored value can also carry labels. A label is a small key-value pair, such as method=GET or region=eu-west, that adds detail to a metric. Because of labels, you can slice the same metric in many ways, for example by server, by route or by status code.
Prometheus mostly uses a pull model. The Prometheus server visits each target over HTTP at regular intervals and reads its current metrics. This step is called scraping. Targets can be found through service discovery, which looks up running services automatically, or through a fixed list in a configuration file.
To ask questions about the stored data, Prometheus provides PromQL, its own query language. You can use PromQL to find averages, rates or totals, and to build rules that create new series or fire alerts.
Why metrics matter
Metrics help you understand why a system behaves the way it does. Suppose a web application suddenly becomes slow. Without data, you are guessing. With a request count metric, you might see that slowness starts exactly when traffic spikes. That tells you that adding more servers could help.
Prometheus is built for this kind of investigation. Each Prometheus server stores its own data on local disk and does not rely on network storage or other remote services. This means it can keep answering questions during an outage, when other parts of your infrastructure may be failing.
The main components
The Prometheus ecosystem is made of several parts. The main Prometheus server scrapes and stores data. Client libraries help you add metrics to your application code. A push gateway accepts metrics from short-lived jobs that may finish before Prometheus gets a chance to scrape them. Exporters translate the metrics of other software, such as HAProxy or Graphite, into a format Prometheus understands. The Alertmanager handles alert notifications.
Many of these parts are optional. You can start with only the server and one or two client libraries. Most components are written in Go, which makes them easy to ship as single static binaries. Dashboards are usually built with Grafana, which reads data from Prometheus. You can learn more in our guide to Grafana and to the broader idea of observability.
When Prometheus fits
Prometheus is a good match for any data that is purely numeric and recorded over time. It works well for monitoring individual machines and for dynamic, service-oriented systems where services start and stop often. Its support for labels and flexible queries is especially useful in microservice setups, where many small services each produce their own metrics.
When it does not fit
Prometheus values reliability over perfect accuracy. The data it collects is sampled and may not be complete enough for exact records. If you need 100 percent accuracy, for example to bill customers for each request, use a different system for that job. You can still use Prometheus for the rest of your monitoring.
Getting started
To try Prometheus, start with a single server and one target, such as the server itself or a simple application that exposes metrics over HTTP. Look at the data with the built-in expression browser, then write a small alert rule. Once you are comfortable with that, add more targets and a dashboard. If your services run behind a proxy, our article on reverse proxies may help you understand how traffic reaches them.
The official overview is a good next read. It explains the project history, the data model and the design goals in more detail.
FAQ
Is Prometheus free to use?
Yes. Prometheus is an open-source project. It is maintained independently of any single company and is hosted by the Cloud Native Computing Foundation.
Does Prometheus store data on a remote server?
No. Each Prometheus server is standalone and stores its data locally. It does not depend on network storage or other remote services to work.
What is the difference between Prometheus and Grafana?
Prometheus collects and stores metrics and can send alerts. Grafana is a tool for building dashboards that display that data, and it can read from Prometheus.
Can Prometheus be used for billing customers?
It is not ideal for that. Prometheus is designed for monitoring, and its data may not be detailed or complete enough for exact billing. A separate system is usually better for billing.
Sources
This page is based on the official documentation below. Read it for full detail.
Prometheus — official documentation ↗Prometheus in the news
Observability as a Control Plane for Multi-Region Failover: Lessons From a Terraform Registry Outage
An InfoQ author describes a day-long Terraform registry failure traced to intermittent S3 signed URL errors, and argues for active-active regions and automated failover driven by observability.
