rollup
rollup [options(...)]?, [metric: expression]+
Rollup raw metrics into aligned metrics.
This verb is deprecated. Please use align instead.
Options
| Option | Type | Meaning |
|---|---|---|
| resolution | duration | How large each rolled-up bucket is (e g 5m) |
| buckets | int64 | Approximately how many buckets to divide the query window into (not accelerable) |
| empty_bins | bool | deprecated |
Categories
Accelerable
rollup is sometimes accelerable, depending on options used. A dataset that only uses accelerable verbs can be accelerated, making queries on the dataset respond faster.
Examples
rollup options(resolution:300s), requests:metric("requests_total")
Generates a column named "requests" holding "requests_total" metric and align them with 300s time bins.
This can be written as align 300s, requests: rate(m("requests_total")) using align, assuming the metric has the rollup property set to "rate".
rollup options(buckets:2000), failed_requests:metric("requests_total")
Generates a column named "failed_requests" holding "requests_total" metric and align them with 2000 uniform time bins in the query window.
This can be written as align options(bins: 2000), failed_requests: rate(m("requests_total")) using align, assuming the metric has the rollup property set to "rate".
rollup options(resolution:300s), failed_requests:metric("requests_total", filter:status_code >= 400 and status_code <= 599)
Generates a column named "failed_requests" holding "requests_total" metric where status_code is in [400, 599], and align them with 300s time bins.
This can be written as align 300s, failed_requests: rate(m("requests_total", status_code >= 400 and status_code <= 599)) using align, assuming the metric has the rollup property set to "rate".
rollup options(resolution:300s), failed_requests:metric("requests_total", type:cumulativeCounter, rollup:avg, aggregate:sum)
Generates a column named "failed_requests" holding "requests_total" metric and align them with 300s time bins with the provided method.
This can be written as align 300s, failed_requests: avg(m("requests_total")) using align.
Updated 8 days ago