Internative Logo

What Is Prometheus? Metrics and Alerting for Cloud-Native Systems

What Is Prometheus? Metrics and Alerting for Cloud-Native Systems

When a system runs as dozens of containers that start, scale and disappear on their own, the old way of monitoring, logging into a server and checking its load, stops working. Teams need numbers from every service, collected automatically, stored over time and queryable when something goes wrong. Prometheus is the open-source tool that became the standard answer to that problem in cloud-native environments, especially on Kubernetes.

This article explains what Prometheus is, how its pull-based model and PromQL work, where it fits, where it does not, and how it compares with the alternatives.

What is Prometheus?

Prometheus is an open-source systems monitoring and alerting toolkit. It collects numeric measurements, called metrics, from applications and infrastructure, stores them as time series in its own database, and lets you query them and raise alerts when they cross a threshold. It is written in Go and runs as a single server binary.

It was originally built at SoundCloud, where work on it began in 2012. After almost four years of development, Prometheus 1.0, with a stable API and user interface, was released on 18 July 2016. The same year it joined the Cloud Native Computing Foundation (CNCF) as the second hosted project after Kubernetes, and in August 2018 it became the second project to graduate from the CNCF.

Prometheus 3.0, the first major release in seven years, followed in November 2024. It brought a new user interface, a native receiver for OpenTelemetry (OTLP) metrics, Remote Write 2.0 and UTF-8 support for metric and label names.

How Prometheus works

It pulls metrics. Instead of waiting for applications to send data, the Prometheus server scrapes them: at a fixed interval it calls an HTTP endpoint, usually /metrics, on each target and reads the current values. If a target stops answering, that itself is a signal.

Every series has labels. A metric such as http_requests_total carries key-value labels like method="POST" or status="500". Each unique combination of labels is its own time series, which is what makes slicing by service, endpoint or region possible.

Targets are discovered. In dynamic environments Prometheus finds what to scrape through service discovery, for example by asking the Kubernetes API which pods exist, so new instances are monitored without manual configuration.

Exporters fill the gaps. Software that does not expose Prometheus metrics itself, such as a database, a load balancer or the operating system, is covered by exporters: small programs that translate its statistics into the Prometheus format. Node Exporter for Linux machines is the most common one.

PromQL and alerts. Data is queried with PromQL, a functional query language for rates, sums, percentiles and comparisons over time. Alerting rules are PromQL expressions; when one fires, Prometheus sends it to Alertmanager, which groups, silences and routes alerts to email, chat tools or on-call systems.

Key features

  • Multi-dimensional data model with metric names and labels.
  • PromQL for ad-hoc analysis, dashboards and alert rules in one language.
  • Local time-series database on the server, with no dependency on distributed storage.
  • Service discovery for Kubernetes, cloud providers and static lists.
  • Client libraries for instrumenting application code, and a Pushgateway for short-lived batch jobs.
  • Alertmanager for deduplication, grouping, silencing and routing of alerts.
  • Remote write to send data to long-term storage systems, and an OTLP receiver for OpenTelemetry metrics.

Where Prometheus is used

  • Kubernetes clusters, where it is the default way to monitor nodes, pods and the control plane.
  • Microservices, to track request rates, error rates and latency for each service.
  • Infrastructure monitoring of servers, databases, message queues and load balancers through exporters.
  • SLOs and on-call alerting, where PromQL rules turn metrics into alerts that page an engineer.
  • Capacity planning, using historical CPU, memory and traffic trends.

When to choose Prometheus, and when not to

Choose Prometheus when:

  • You run containers or Kubernetes and need monitoring that follows instances as they appear and disappear.
  • You want an open-source, self-hosted monitoring stack without per-host licence fees.
  • Most of what you need to know can be expressed as numbers over time: rates, durations, counts, saturation.
  • You want alert rules kept as code, reviewed and versioned like the rest of the system.

Look elsewhere, or add something, when:

  • You need 100% accurate per-event data, such as per-request billing. Prometheus samples at intervals; the project itself says it is not a good choice for that.
  • You need logs or distributed traces. Prometheus stores numeric metrics only; logs go to a tool such as Elasticsearch or Seq, and errors and traces to a tool such as Sentry.
  • You need long retention or a global view across many clusters. A single Prometheus server is not built for that; it is usually paired with long-term storage such as Thanos or Grafana Mimir.
  • The team wants a fully managed service with no servers to run. A hosted platform such as Datadog trades cost for less operational work.

High-cardinality labels are the most common operational mistake. Putting user IDs or request IDs into labels creates millions of series and can exhaust the server's memory.

Prometheus and its alternatives

OptionTypeStrengthBest fit
PrometheusOpen source, pull-basedKubernetes integration, PromQLCloud-native metrics and alerting
Thanos / Grafana MimirOpen source, Prometheus-compatibleLong-term storage, global viewMany clusters, long retention
VictoriaMetricsOpen source, Prometheus-compatibleStorage efficiencyLarge metric volumes
ZabbixOpen source, agent-basedClassic server and network monitoringTraditional data centres
DatadogCommercial SaaSManaged metrics, logs and traces togetherTeams that prefer a hosted platform

The most common question is "Prometheus or Grafana?". They are not rivals. Prometheus collects and stores the metrics; Grafana is the dashboard layer that visualises them, and most teams use the two together. Prometheus vs Zabbix is a closer comparison: Zabbix comes from agent-based monitoring of fixed servers and networks, while Prometheus was designed for dynamic, containerised systems.

How we use Prometheus at Internative

We use Prometheus to monitor system health, performance and capacity in real time. Its close integration with Kubernetes and its flexible query language let us run scalable platforms with confidence and clear visibility into what each service is doing.

Monitoring is a large part of what keeps a system healthy after launch, a topic we cover in Software maintenance and support after launch.

If you need monitoring and alerting set up for a production system, our application maintenance and monitoring and DevOps teams can help.

Frequently asked questions

What is Prometheus used for in DevOps?

DevOps and SRE teams use Prometheus to collect metrics from applications and infrastructure, watch service health in dashboards, and alert the on-call engineer when error rates, latency or resource usage cross a threshold. It is also used to define and track service level objectives.

Is Prometheus the same as Grafana?

No. Prometheus is a monitoring system and time-series database that collects and stores metrics. Grafana is a visualisation tool that reads data from Prometheus and other sources and draws dashboards. They are usually deployed together.

What can be monitored with Prometheus?

Anything that can expose numbers over HTTP: applications instrumented with a client library, Kubernetes components, Linux and Windows machines through exporters, and databases, web servers and message queues through their own exporters. Short-lived jobs can push results through the Pushgateway.

What are the disadvantages of Prometheus?

It stores metrics only, not logs or traces. A single server has limited retention and no built-in clustering, so large setups add tools such as Thanos or Mimir. High-cardinality labels can overload it, and it is not accurate enough for per-event use cases such as billing.

Is Prometheus still used?

Yes. It is a graduated CNCF project, the default monitoring choice on Kubernetes, and actively developed: Prometheus 3.0, released in November 2024, added native OpenTelemetry metrics support and a new interface.

Related services

Where this topic becomes an engagement.

Keep reading

The articles that follow this one.