Skip to content
IT glossary
DevOps and cloudUpdated December 3, 2026

Prometheus

Prometheus collects numeric measurements from applications and infrastructure and stores their history. Teams use it to see how systems behave over time and get alerts when something goes wrong.

Also known as: PromQL, экспортер

What Prometheus does

Prometheus is an open-source monitoring system. Say an API starts returning more errors after a release. Prometheus can show when the error rate changed and whether the increase affected all instances or just one. It works with metrics: numeric measurements such as request counts, memory usage, and request duration. It does not keep a record of individual requests.

From an endpoint to a time series

A typical Prometheus server periodically fetches metrics from HTTP endpoints, often at /metrics. Each fetch is called a scrape, and the approach is called pull because Prometheus initiates it. The list of targets can come from configuration or from service discovery, such as the Kubernetes API. Applications can expose their own metrics. For systems that don't expose metrics in a compatible format, an exporter collects or translates their measurements and exposes them for scraping. For example, node_exporter exposes Linux host metrics such as available filesystem space.

Prometheus stores timestamped samples in a time-series database. A metric name and its full set of labels identify one series. An HTTP request counter with status="200" is a different series from the same counter with status="500". That lets you break down requests by status with a query rather than give each status its own metric name.

A PromQL example

If your application exposes http_requests_total and each service has its own job label value, this query shows the average number of requests per second for each service over the last five minutes:

sum by (job) (rate(http_requests_total[5m]))

The raw counter tells you how many requests an instance has counted, not how busy it is now. rate() computes the per-second increase for each series and accounts for resets, such as when a process restarts. The outer sum combines the rates while keeping one result per job. Applying rate() before summing lets it detect resets in individual instances.

Dashboards and alerts

Grafana can query Prometheus to display dashboards. Prometheus itself evaluates alerting rules and sends firing alerts to Alertmanager, which groups and routes notifications. A dashboard might show that errors spiked in one service; logs and traces can then help explain what happened on particular requests.

What interviewers ask

Expect to explain when to use a counter versus a gauge. Total requests belong in a counter; requests currently in flight belong in a gauge because the value can rise or fall. Another common question is why putting request_id in a label is a bad idea: it can create a new time series for every request, driving up memory and storage costs. Finally, know what up == 0 tells you: the last scrape of a known target failed. That is not the same as proving the service is down for users.