dpm-finder
Find the Prometheus metrics that drive your Grafana Cloud bill. `dpm-finder` is a Grafana Professional Services CLI that ranks metrics by Data Points per Minute (DPM) with per-label-set breakdown, optional `--cost-per-1000-series` pricing, and a Prometheus-exporter mode. Use when investigating high
- 0
- Installs
- —
- Rating
- —
- Success rate
- 2
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 47fbc51cb7c7665a… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
dpm-finder
Grafana PS tool ranking Prometheus metrics by DPM with per-series breakdown. Source: https://github.com/grafana-ps/dpm-finder
Prerequisites
- Python 3.9+
- A Grafana Cloud Prometheus endpoint URL + numeric stack ID + API key (
glc_…,metrics:readscope)
Common Workflows
One-shot analysis (most common)
# 1. Clone + venv + install
git clone https://github.com/grafana-ps/dpm-finder.git
cd dpm-finder
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
# 2. Configure creds — copy .env_example → .env and fill in:
# PROMETHEUS_ENDPOINT https://prometheus-<cluster_slug>.grafana.net (NOTHING after .net)
# PROMETHEUS_USERNAME <numeric stack id>
# PROMETHEUS_API_KEY glc_…
# 3. Verify creds before scanning — should return >0 series count
curl -s -u "$PROMETHEUS_USERNAME:$PROMETHEUS_API_KEY" \
"$PROMETHEUS_ENDPOINT/api/v1/label/__name__/values" | jq '.data | length'
# 4. Run the scan (10-min lookback, 2.0 DPM minimum, top output)
./dpm-finder.py -f json -m 2.0 -t 8 --timeout 120 -l 10
# 5. Read the result — top 10 metrics by DPM
jq -r '.metrics | sort_by(-.dpm) | .[:10][] | "\(.dpm)\t\(.series_count)\t\(.metric_name)"' metric_rates.json
If step 5 is empty, lower -m or confirm the endpoint URL has no trailing path after .net.
Discover stack details with gcx
If gcx is installed it can derive the endpoint + username:
gcx config check # active stack context
gcx config list-contexts # all configured stacks
gcx config view # full config with endpoints
The Prometheus endpoint pattern is https://prometheus-{cluster_slug}.grafana.net. Username is the numeric stack ID.
Without gcx: look up in the Grafana Cloud portal, or query grafanacloud_instance_info{name=~"STACK_NAME.*"} on the usage datasource.
Multi-stack runs
Limit to max 3 concurrent runs to avoid GCloud rate limits. Batch the stacks and wait for each batch before the next.
Interpreting results
- DPM = max data points per minute across that metric's series
- series_count = active time-series count for that metric
- series_detail[] (JSON / text only) = per-label-combination DPM breakdown — use this to spot the offending label
- Sort by DPM descending → noisiest metrics; combine with
--cost-per-1000-seriesto prioritize by spend
Troubleshooting
- 401 / 403 — API key invalid or missing
metrics:read; confirmPROMETHEUS_USERNAMEis the numeric stack ID - Timeouts — bump
--timeoutto 120+ for stacks with thousands of metrics - HTTP 422 — metric has aggregation rules; tool warns + skips automatically
- Empty results — lower
-m; verify endpoint has no trailing path - Connection errors — exponential backoff retries up to 10 times; persistent failure usually = network/firewall
References
references/cli.md— full flag reference, output-format details, exporter mode, Docker invocation, auto-exclusion rules, retry behavior
Resources
Files
2- SKILL.md
b7bc79fd573.8 KB - references/cli.md
334a06f4b01.8 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from grafana/skills8
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
Manage Grafana Cloud accounts — organizations, stacks, RBAC roles and assignments, SSO/SAML/OAuth/GitHub auth, service accounts for CI/CD, user invites, team membership, and API-driven provisioning. Creates stacks via the Cloud API, mints service-account tokens, applies role assignments, configures
Use when the user asks to "write a validator", "add validation", "implement admission control", "write a mutating webhook", "add a mutation handler", "validate incoming resources", "implement admission logic", "add admission webhooks", "write ingress validation", or asks how to validate or mutate re
Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack/PagerDuty/email/webhook), notification policies with hierarchical matchers, silences, mute timings, on-call schedules and escala
Build a unified telemetry pipeline with Grafana Alloy — one OpenTelemetry-compatible binary that collects metrics, logs, traces, and profiles and ships to Grafana Cloud / Prometheus / Loki / Tempo / Pyroscope. Covers the Alloy config language (blocks, `sys.env`, component refs), `prometheus.scrape`
Get RED metrics + service maps + frontend RUM + AI/LLM monitoring out of Grafana Cloud — Application Observability (`traces_spanmetrics_*` from OTel traces, p50/p95/p99 latency, exemplar-to-trace, traces-to-logs / profiles), Frontend Observability with the Faro Web SDK (Core Web Vitals, session repl
Use when starting any grafana-app-sdk work — scaffolding a Grafana app, initializing a Grafana App Platform app, picking a deployment mode (standalone operator / grafana/apps / frontend-only), wiring app-specific config, or onboarding to the SDK. Covers `grafana-app-sdk` CLI install, `project init`
Connect AI coding agents (Claude Code, Cursor, VS Code, OpenAI Codex) to Grafana Cloud via the `mcp-grafana` Model Context Protocol server. Installs the server with `go install`, generates a Grafana service-account token, wires `~/.claude/settings.json` or `~/.cursor/mcp.json` with the `command` + `
Related tooling skillsscan passed
Write-time code quality enforcement using Plankton — auto-formatting, linting, and Claude-powered fixes on every file edit via hooks. Use when setting up write-time formatting, linting, or auto-fix hooks on file edits.
Web performance regression detection. (gstack)
This skill should be used when the user asks to "demonstrate skills", "show skill format", "create a skill template", or discusses skill development patterns. Provides a reference template for creating Claude Code plugin skills.
Helps you build and check a color system for your project. It generates palettes, names semantic tokens, converts between formats and measures contrast.
Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.
Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.