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
adaptive-metrics is a Grafana Cloud cost-management skill that reduces Grafana Cloud Metrics spend by shrinking active-series count using Adaptive Metrics aggregation rules. It solves the problem of an exploding or expensive active-series bill — often caused by high-cardinality labels such as pod_uid, service_instance_id, or version — by pre-aggregating metrics before storage so that dropped labels no longer count toward billing, while the original high-cardinality samples keep flowing. It triggers even on general phrasing like "reduce cardinality", "too many series", or "metrics spend".
The skill documents three main workflows against the Adaptive Metrics API (adaptive-metrics.grafana.net, Bearer auth with a metrics:write key): reviewing and applying auto-recommendations sorted by series-reduction impact, hand-writing custom exact- or regex-match rules that drop specified labels with a chosen aggregation type, and dropping unused metrics entirely (using usage analysis plus an Alloy write_relabel_config drop). Each workflow captures a baseline series count, applies the change, and verifies the drop by re-querying the metrics endpoint (prometheus-prod-XX.grafana.net, basic auth with a metrics:read token) and checking grafanacloud_instance_active_series and grafanacloud_instance_active_series_dropped_by_aggregation_rules. It emphasizes safety checks — grepping dashboards, alerts, and recording rules before dropping a label or metric — and documents rollback by listing and deleting rules or disabling them in the UI. A references/api.md file details full payloads for exact and regex rules and aggregation types. All credentials are shown as placeholders; there is no exfiltration.
It targets platform engineers, SREs, and observability owners investigating a high Mimir/Grafana Cloud bill. Use cases include applying recommended aggregations, dropping a specific label like version, removing unused metrics, and measuring active-series before and after.
It reduces billed active-series count by pre-aggregating high-cardinality metrics before storage. The original samples keep flowing, but labels dropped by aggregation rules no longer count toward billing.
A paid Grafana Cloud Metrics plan, an API key with metrics:write for the Adaptive Metrics API (Bearer auth), a metrics:read token plus numeric metrics user for the query endpoint (basic auth) used in verification, and access to Home → Adaptive Metrics in the Cloud portal.
Yes. Rollback is documented: list rules and DELETE the offending rule via the API, or disable it in the UI. The skill also advises grepping dashboards, alerts, and recording rules before dropping any label or metric.
Rules take effect within about 5 minutes, and full billing impact appears within about an hour. Unused-metric drops via Alloy should clear from series counts after about 10 minutes.
Query grafanacloud_instance_active_series for total billed series and grafanacloud_instance_active_series_dropped_by_aggregation_rules for series specifically dropped by Adaptive Metrics rules, comparing counts before and after.
Quick Setup:
.claude/skills/Repository
grafana/skills