rollup¶
Type of operation: Aggregate, Metrics
Description¶
Rollup raw metrics into aligned metrics
Usage¶
rollup [ options ], metric ...
Argument |
Type |
Required |
Multiple |
---|---|---|---|
options |
options |
Optional |
Only one |
metric |
expression |
Required |
Can be multiple |
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 |
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.
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.
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.
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.