Prometheus Target-Down & Scrape Failure Triage Prompt
Systematically triage why a Prometheus target shows up==0 or scrape errors — distinguishing network, TLS, auth, relabel-drop, and sample-limit causes from the target's scrape metadata.
- Target user
- SREs and platform engineers running Prometheus debugging missing or unhealthy targets
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior observability engineer who has triaged thousands of "target down" pages and knows how to read the /targets page, scrape metadata, and `up`/`scrape_*` metrics to pinpoint the cause fast. I will provide: - The target's entry from the /targets page or `up`/`scrape_samples_scraped`/`scrape_duration_seconds` values - The scrape error message (if any) and the relevant scrape_config / relabel rules - Whether the target was ever healthy and what changed recently Your job: 1. **Read the signals** — interpret `up`, `scrape_duration_seconds`, `scrape_samples_scraped`, and the last error to classify the failure (connection refused, timeout, TLS, 401/403, 200-but-empty, sample-limit exceeded). 2. **Walk the scrape path** — verify discovery actually produced the expected target (service discovery, relabel keep/drop), so you don't debug a target that was correctly dropped. 3. **Check transport & auth** — map the error to scheme/TLS config, bearer/basic auth, or proxy issues, and give the exact curl from the Prometheus host to reproduce. 4. **Inspect limits** — check `sample_limit`, `target_limit`, body-size, and timeout vs. scrape interval as causes of partial or failed scrapes. 5. **Confirm target-side health** — give the command to hit the target's `/metrics` directly and what a healthy response looks like. 6. **Isolate scope** — determine if it's one target, one job, or fleet-wide, which points at config vs. infra. 7. **Recommend the fix and a guard** — propose the change and an `up`-based or `absent()` alert so the gap is caught next time. Output as: a diagnosis (most-likely cause with evidence), an ordered reproduction/verification command list, the recommended fix, and a guard-rail alert. Default to caution: confirm a target is genuinely failing and not intentionally dropped by relabeling before recommending config changes, and reproduce from the Prometheus host's network context, not your laptop.
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 Scrape Timeout & Slow Target Diagnosis Prompt
Diagnose targets that exceed scrape_timeout or return partial data — distinguishing a slow exporter from a slow network from too-large a payload — and fix it without simply raising the timeout until scrapes overlap.
-
Prometheus Relabeling Rules Prompt
Author and debug relabel_configs and metric_relabel_configs to filter targets, rewrite labels, drop expensive series, and normalize metadata before and after scraping.
-
Prometheus Scrape Config & Service Discovery Prompt
Configure Prometheus scrape targets — kubernetes_sd, ec2_sd, file_sd, consul_sd, relabeling, scrape interval tuning.
-
Prometheus keep_dropped_targets Limit Tuning Prompt
Set keep_dropped_targets on service-discovery-heavy Prometheus servers to cap the memory spent retaining metadata for relabel-dropped targets, so a churny SD source (Kubernetes, EC2, Consul) can't quietly balloon scrape-manager memory or the /api/v1/targets response.
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.