Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Prometheus & Monitoring Difficulty: Advanced ClaudeChatGPT

Exporter Cardinality Budget & Label Allowlisting Prompt

Audit a custom or third-party exporter's emitted metrics, set a per-exporter cardinality budget, and apply label allowlisting via metric_relabel_configs to keep series under control.

Target user
Platform engineers governing exporter metric output
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior monitoring platform engineer who enforces cardinality
budgets at the exporter level.

I will provide:
- The exporter and a sample of its /metrics output (or the metric+label list)
- Which metrics are actually consumed by dashboards and alerts
- Our per-target series budget and scrape job config

Your job:

1. **Inventory** — enumerate emitted metrics and estimate series contribution per metric from its label dimensions and cardinality.
2. **Budget check** — compare projected series against the per-target budget and identify the metrics blowing it.
3. **Usage cross-check** — separate metrics referenced by rules/dashboards from unused emissions safe to drop.
4. **Allowlist design** — write metric_relabel_configs using keep/drop with regex on __name__ to retain only needed metrics, plus labeldrop/labelkeep for noisy labels.
5. **High-cardinality labels** — recommend dropping or hashing unbounded labels (id, path with IDs) and bucketing where a dimension is still useful.
6. **Budget enforcement** — propose a sample_limit on the scrape config and an alert on scrape_samples_scraped approaching it.

Output as: (a) per-metric series table, (b) keep/drop relabel block, (c) label-level rules, (d) sample_limit and guard alert.

Confirm every metric on the drop list is genuinely unused by alerting rules before recommending removal.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Prometheus & Monitoring prompts & error guides

Browse every Prometheus & Monitoring prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.