# adaptive-metrics

> Claude/Codex skill by [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars · Updated 2026-10-17

Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact/regex rules, label-drop config, unused-metric detection, and Alloy remote\_write fallback. Use when investigating a high Mimir/Grafana Cloud bill, hunting high-cardinality labels (\`pod\_uid\`, \`service\_instance\_id\`, \`version\`), pre-aggregating counters/gauges, dropping unused metrics, or measuring \`grafanacloud\_instance\_active\_series\` before/after — even when the user says "reduce cardinality", "too many series", "metrics spend", "active series count is exploding", or "drop the version label" without naming Adaptive Metrics.

## Install

```sh
git clone https://github.com/grafana/skills /tmp/skills && ln -s /tmp/skills/skills/grafana-cloud/adaptive-metrics ~/.claude/skills/adaptive-metrics
```

## From README

Grafana Cloud Adaptive Metrics Docs: https://grafana.com/docs/grafana-cloud/cost-management-and-billing/reduce-costs/metrics-costs/adaptive-metrics.md Aggregation rules that pre-shrink high-cardinality metrics before storage — directly reduces active-series billing. Prerequisites Grafana Cloud Metrics plan (any paid tier) API key with metrics:write (for the Adaptive Metrics API — adaptive-metrics.grafana.net, Bearer auth) For the verification queries: the metrics query endpoint (prometheus-prod-XX.grafana.net) uses HTTP basic auth — (numeric stack/instance ID) plus a token with metrics:read — not the Bearer key Access to Home → Adaptive Metrics in the Cloud portal Common Workflows Review + apply auto-recommendations Rollback — delete the rule: Hand-write a custom rule Full payloads (regex match, aggregation types, all caveats): references/api.md. Drop unused metrics entirely Measure the impact Rules take effect within 5 minutes; full billing impact appears within an hour.

## Links

- HTML page: https://omgskills.com/library/grafana/skills/adaptive-metrics/
- GitHub: https://github.com/grafana/skills
- Author: [@grafana](https://omgskills.com/library/grafana/index.md)

## More from this repo

- [k6-docs](https://omgskills.com/library/grafana/skills/k6-docs/index.md) — Used to write or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types),...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 295 stars
- [admin](https://omgskills.com/library/grafana/skills/admin/index.md) — Used to manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO/SAML/OAuth/GitHub auth,...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars
- [admission-control](https://omgskills.com/library/grafana/skills/admission-control/index.md) — Used when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating...
   - [@grafana](https://omgskills.com/library/grafana/index.md) · 286 stars
