Skip to main content
Lexicon
Lexicon
Prometheus

Prometheus

Difficulty: Introductory
5 min read
Updated 2026-08-27

In plain English

Plain definition

Prometheus is a monitoring and alerting system for collecting, storing and querying numerical measurements that change over time. These measurements, called metrics, can represent request counts, response durations, error totals, resource use or the health of a service. In day-to-day operations, Prometheus helps engineers ask questions about current and historical system behaviour and evaluate alerting rules. It is evidence about a system, not the system itself: an absent or misleading metric can make a healthy service appear unhealthy, or conceal a real problem.

How Prometheus collects and stores metrics

Prometheus usually gathers metrics by retrieving them from configured endpoints. Each series is identified by a metric name and labels, while each sample associates a value with a time. Prometheus stores the resulting data and provides a query language for selecting and aggregating series. Rules can evaluate queries to create derived series or alert states.

The precise configuration surface and supported behaviour can vary by release.

Start with one target and one metric

A careful Prometheus change starts with one known test target and one expected metric. You can then watch each stage: the target is discovered, collection succeeds, samples become queryable and any associated rule produces the expected state. This narrow scope separates collection faults from query or rule faults and limits the effect of a mistake.

It has worked when the intended target appears in discovery, its collection health is successful, a query returns recent expected samples and relevant rules evaluate without reported errors. A successful query alone is insufficient if its data is stale, unexpectedly labelled or collected from the wrong target.

The usual problems are an unreachable metrics endpoint, a discovery or label mismatch, malformed configuration, rule-evaluation errors and unexpected gaps in samples. High-cardinality labels can also increase operational cost and complicate queries. Acceptable limits depend on the environment and require local capacity evidence.

Where Prometheus fits in a monitoring stack

Prometheus sits between instrumented or exporting systems and consumers of monitoring results. Targets expose metrics; discovery and collection logic determine what Prometheus retrieves; storage retains samples; queries and rules interpret them; alert states may then be sent to a separate alert-handling component. Dashboards or other clients can query Prometheus but do not prove that collection is complete or correct.

This architecture creates security boundaries. Metrics endpoints can reveal operational details, and access to configuration or rule management can alter monitoring outcomes. Use least privilege, restrict network reachability appropriately and avoid placing secrets in labels or metric values. Residual risks include incomplete instrumentation, stale data, excessive series growth and alerts that technically evaluate but do not represent user impact.

Adding a request counter from a test service

Take a non-production HTTP service that exposes a request counter. The operator defines success before making any change: the single test target must be discovered, collection must succeed, a query for the counter must return a recent sample with the expected labels, and a test rule must evaluate without error.

  1. Record the confirmed Prometheus version, test target, expected metric name and current known-good configuration.
  2. Have a second engineer review the proposed target and rule before it is applied.
  3. Apply the reviewed change only through the organisation’s established reversible process. This page gives no generic change command, because it cannot confirm how your deployment works.
  4. Inspect target discovery and collection health, then query the metric and inspect rule evaluation.
  5. Stop if the configuration is rejected, the target is unexpected, collection fails, labels differ materially or existing checks regress.

Recovery means restoring the recorded known-good configuration through the same controlled process, validating that the prior targets and rules return to their baseline state, and escalating if restoration does not recover that state. Do not delete stored data merely to clear a symptom.

What Prometheus does not prove

Installing Prometheus does not automatically provide complete observability. Prometheus can only collect metrics that targets expose and that its discovery and collection configuration reaches. Useful monitoring also depends on meaningful instrumentation, stable labels, queries, rules, capacity planning and an operational response path.

An active alert does not prove a service failure either. An alert is the result of a rule evaluated over available data. Keep that fact separate from the inference that users are affected, then corroborate it with service-level evidence.

Terms you will meet alongside Prometheus

  • Metric: a named numerical measurement represented over time.
  • Time series: samples associated with a metric identity and labels across time.
  • Label: a key-value dimension used to distinguish and select series.
  • Target: an endpoint or monitored instance from which metrics are collected.
  • Query: an expression used to select, transform or aggregate time-series data.
  • Recording rule: a rule that evaluates an expression and stores its result as a new series.
  • Alerting rule: a rule that evaluates conditions and produces an alert state.

Further reading

Consult the Prometheus documentation for canonical concepts and the instructions matching the deployed release. Before approving a change, confirm the Prometheus version, permissions and deployment method.

Go ahead only when the test scope, baseline and recovery owner are recorded. If discovery, ingestion, query freshness or rule evaluation cannot be verified independently, retain the existing configuration and escalate rather than broadening the change.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

More from KBY that goes with this term.