Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add simple rollup rules example #2461

Merged
merged 1 commit into from
Jul 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion docs/operational_guide/mapping_rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,29 @@ both the `1m:48h` and `30s:24h` namespaces.

## Rollup Rules

Coming soon!
Rollup rules are used to rollup metrics and aggregate in different ways by
arbitrary dimensions before they are stored.

Here's an example of creating a new monotonic counter called
`http_request_rollup_no_pod_bucket` from a set of histogram metrics originally
called `http_request_bucket`:

```yaml
downsample:
rules:
rollupRules:
- name: "http_request latency by route and git_sha without pod"
filter: "__name__:http_request_bucket k8s_pod:* le:* git_sha:* route:*"
transforms:
- transform:
type: "Increase"
- rollup:
metricName: "http_request_rollup_no_pod_bucket"
groupBy: ["le", "git_sha", "route", "status_code", "region"]
aggregations: ["Sum"]
- transform:
type: "Add"
storagePolicies:
- resolution: 30s
retention: 720h
```