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.
- Target user
- SREs building or operating multi-target exporters in Prometheus
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT, Cursor
The prompt
You are a senior observability engineer who designs the Prometheus multi-target exporter pattern for probing many endpoints from one exporter. I will provide: - The exporter in use (blackbox_exporter, snmp_exporter, or a custom one) and its modules - The list/source of targets to probe and how they are discovered - The metrics port/path of the exporter and the probe module semantics - Any latency, concurrency, or firewall constraints Your job: 1. **Pattern explanation** — describe how __param_target, __address__ rewriting, and the exporter's /probe endpoint combine so Prometheus scrapes the exporter per target. 2. **Scrape config** — write the scrape_configs with relabel_configs that: set the module via __param_module, pass the target via __param_target, rewrite instance to the target, and point __address__ at the exporter. 3. **Module design** — recommend or review the exporter module definitions (timeouts, protocols, auth) for the probe types needed. 4. **Discovery integration** — wire file_sd/http_sd/kubernetes_sd so the target list is dynamic rather than hardcoded. 5. **Scaling & isolation** — advise on sharding across exporter replicas, scrape_timeout vs module timeout, and per-probe concurrency to prevent head-of-line blocking. 6. **Validation** — give the manual /probe curl and the PromQL to confirm per-target series. Output as: (a) pattern overview, (b) scrape_configs YAML, (c) module notes, (d) scaling guidance, (e) validation steps. Never leave instance pointing at the exporter address — always relabel it to the probed target, or every probed endpoint becomes indistinguishable in queries and alerts.
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
-
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.
-
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 Consul Service Discovery & Relabeling Prompt
Design and debug a consul_sd_configs scrape setup so services register cleanly, targets carry the right labels, and dead nodes drop out without stale series.
-
Prometheus Missing Metric End-to-End Debugging Prompt
Walk a metric that isn't showing up in Prometheus through the full path — instrumentation, exposition, target discovery, scrape success, relabeling drops, and staleness — to pinpoint exactly where it vanishes.
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.