Control Prometheus Cardinality and Storage Growth

8 steps · about 2 h 44 min · Intermediate

  1. Explore series with focused PromQL (doc, Prometheus Documentation, 18 min)

    Query examples show how label selection and aggregation reveal the dimensions behind series growth.

  2. Precompute bounded operational views (doc, Prometheus Documentation, 18 min)

    Well-designed recording rules can make repeated analysis cheaper without copying unbounded labels into more series.

  3. Audit metric and label design (doc, Prometheus Documentation, 14 min)

    Consistent names and coherent dimensions make expensive metrics easier to find, query and replace.

  4. Inventory series through the HTTP API (tutorial, Prometheus Documentation, 22 min)

    Series and label endpoints provide direct evidence of which matchers and dimensions expand the active set.

  5. Rank cardinality with PromQL aggregation (doc, Prometheus Documentation, 18 min)

    Grouped counts turn a general storage complaint into specific metric families and labels to address.

  6. Drop or reshape series before ingestion (doc, Prometheus Documentation, 24 min)

    Metric relabeling is the last collection-stage control before unwanted series consume memory and disk.

  7. Size retention and local storage (doc, Prometheus Documentation, 24 min)

    Retention time, size limits and WAL behavior determine the disk headroom required for the remaining series.

  8. Verify runtime and storage health (tutorial, Prometheus Documentation, 26 min)

    Readiness, runtime information and post-change query checks prove that the reduction improved health without hiding needed signals.