Billing and usageActive series and DPM

Active series and DPM

Grafana Cloud calculates metrics usage by looking at two components: active series and data points per minute (DPM).

  • An active series is a time series that receives new data points, or samples. When you stop updating or scraping a time series, it is no longer considered active for billing purposes. Specific definitions of active depend on the data source. To learn more, see active series below.
  • A data point is a single measured occurrence, or sample, of a metric within a time series, consisting of a unique value and timestamp.

For information about how Synthetic Monitoring usage is billed, see: Synthetic Monitoring billing.

Prometheus time series

A Prometheus time series is a list of timestamp and value pairs, or samples, identified by a metric name and zero or more pairs of label names and label values.

For example, consider the following output from a Prometheus metrics exporter:

node_cpu_seconds_total{host="host1",cpu="0",mode="user"}
node_cpu_seconds_total{host="host1",cpu="1",mode="user"}

In this example, we can determine the following:

  • The metric name is node_cpu_seconds_total.
  • There are three labels, where:
    • The label names are host, cpu, and mode.
    • The label values are host1, 0 or 1, and user.
  • The are two total time series, since the label value of cpu is different for each time series even though host and mode are the same.

The example above represents two time series. When you scrape a metrics endpoint and a time series generates a sample, there will be a specific timestamp and measured value associated with the time series. If you scrape the exact same time series and it generates a new sample, for example 1 minute later, that creates a second data point in the same time series, with a new timestamp and value.

Metrics usage can ramp up quickly when a given metric has many different combinations of labels. This is called high cardinality. For example, with 6 different modes, 10 hosts, and 4 CPUs, node_cpu_seconds_total would count towards 6*10*4, or 240 active series of your usage. If your scrape interval is 15 seconds, this would result in a DPM of 4, or total DPM of 960 data points.

You can read a detailed explanation of the Prometheus data model in the Prometheus documentation.

What are Graphite time series?

Unique times series are equivalent to metric paths for Graphite. For example, below is an output from Graphite with eight unique time series:

collect.host1.cpu-0.cpu-idle
collect.host1.cpu-0.cpu-user
collect.host1.cpu-0.cpu-wait
collect.host1.cpu-0.cpu-system
collect.host2.cpu-3.cpu-idle
collect.host2.cpu-3.cpu-user
collect.host2.cpu-3.cpu-wait
collect.host2.cpu-3.cpu-system

If Graphite tags are used, then below is an output with eight unique time series:

collect.cpu;host=host1;cpu=0;mode=idle
collect.cpu;host=host1;cpu=0;mode=user
collect.cpu;host=host1;cpu=0;mode=wait
collect.cpu;host=host1;cpu=0;mode=system
collect.cpu;host=host2;cpu=3;mode=idle
collect.cpu;host=host2;cpu=3;mode=user
collect.cpu;host=host2;cpu=3;mode=wait
collect.cpu;host=host2;cpu=3;mode=system

For more information on using Graphite tags, see Graphite Tags

Billing calculations

Billing is based on usage, and usage is determined by two primary factors:

  • The number of active series (95th percentile)
  • The number of data points per minute (DPM), also at the 95th percentile.

To learn more about 95th percentile usage billing, see the section below.

If your average DPM per active series is greater than the included DPM, then your usage will be based on total DPM.

Illustrative Example for Grafana Cloud Pro:

  • Scenario A: 50,000 active series at a 60 second scrape interval (that is, 1 DPM) Pricing: 50,000 active series * (1 DPM / 1 DPM Included) * ($8 / 1000 active series) = $400 / month
  • Scenario B: 50,000 active series at a 30 second scrape interval (that is, 2 DPM) Pricing: 50,000 active series* (2 DPM / 1 DPM Included) * ($8 / 1000 active series) = $800 / month

Note that Grafana Cloud Advanced also provides a higher resolution of 4 DPM per active series for higher resolution needs. Grafana can also provide volume based discounts as your data needs grow. Contact us for more information on upgrading to Grafana Cloud Advanced.

Active series

An active series is a time series where new samples are being generated.

The time span after which a series is no longer considered active after receiving the last data point is different for Prometheus and Graphite:

  • For Prometheus, a time series is considered active if new data points have been generated within the last 15 to 30 minutes.
  • For Graphite, a time series is considered active if new data points have been generated within the last eight hours.

Data points per minute

The second component for calculating total usage in Grafana Cloud is data points per minute (DPM).

Grafana Cloud Pro includes a default resolution (included DPM) of 1 DPM per active series, but you can decrease the scrape interval and ship data points more frequently (increase your DPM), for an additional charge.

Grafana Cloud Advanced allows a choice of two options for the included DPM: our default 1 DPM option and a 4 DPM option for higher-resolution use-cases.

In the either case, your usage and cost would be calculated as follows (in pseudo-PromQL):

Active series:

active_series = quantile_over_time(0.95, sum by (id)(grafanacloud_instance_active_series < Inf)[30d:])

DPM:

total_dpm = quantile_over_time(0.95, sum by (id)(grafanacloud_instance_samples_per_second < Inf)[30d:]) * 60

Total usage:

usage = max(active_series, total_dpm/included_dpm)

Total cost:

cost = (usage/1000) * $8

95th percentile billing

Grafana Cloud tracks the number of active series shipped and the total DPM rate over each billing period.

For each new billing period, you are billed based on the 95th percentile of:

  • The total number of active series sent
  • The total DPM across all active series

This helps you avoid getting billed for unexpected or temporary spikes in usage, such as when initially configuring Prometheus or the Grafana Agent.

In other words, Grafana Cloud forgives the top five percent of usage “time” in each billing period (month), which is roughly the top ~36 hours of usage (0.05*720 = 36).

For example, if you normally send around 6,000 active series but spike up to 30,000 active series for a total of 24 hours in a month, you would still only be billed at the rate of 6,000 active series.