Data Model

Prometheus stores time series, streams of numeric values that are sampled at ongoing timestamps:

Prometheus data model in a graph

Each time series consists of an identifier and a set of sample values:

Prometheus data model

Series identifiers

Every series is uniquely identified by a metric name and a set of key/value pairs called "labels".

  • The metric name identifies the overall aspect of a system that is being measured (like http_requests_total, the total number of HTTP requests handled by a given server process).
  • Labels allow you to partition a metric into subdimensions (like method="GET" vs. method="POST" telling you how many requests for each HTTP method type were handled). Labels can have different origins: For example, an instrumented target may itself expose metrics that are already split up by a set of labels, or a Prometheus server may attach target labels to collected series that identify where they came from.

The metric name and labels that form the series identifiers are indexed in Prometheus' TSDB and are used for looking up series when querying data.

Series samples

Samples form the bulk data of a series and are appended to an indexed series over time:

  • Timestamps are 64-bit integers in millisecond precision.
  • Sample values are 64-bit floating point numbers (allowing integer precision up to 2^53).