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
-
Prometheus Multi-Target Exporter Module Design Prompt
Design the multi-target exporter pattern (blackbox/snmp-style modules plus relabel-driven __param_target) so one exporter probes many targets without per-target scrape jobs.
-
Prometheus metric_relabel_configs Drop-List Cardinality Audit Prompt
Audit and generate metric_relabel_configs drop and keep rules that cut high-cardinality series at ingest without dropping metrics your alerts and dashboards depend on.
-
Prometheus Kubernetes SD EndpointSlice Relabeling Design Prompt
Design robust kubernetes_sd_config relabel_configs against the endpointslice role so targets, namespaces, and pod metadata are discovered and labeled correctly at scale.
-
Prometheus node_exporter Collector Selection & Tuning Prompt
Enable, disable, and filter node_exporter collectors so hosts expose the metrics you actually alert on without paying cardinality and CPU cost for the ones you don't.
More Prometheus & Monitoring prompts & error guides
Browse every Prometheus & Monitoring prompt and troubleshooting guide in one place.
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.