Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Missing Metrics

Direct answer

Missing metrics: a series stops or never appears because the target is down, scrape fails, relabelling drops it, the metric name/labels changed, or the code path never ran.

When to use this

Use it when panels show "No data" or alerts silently stop.

First 30 seconds

1. Target health: up{job="<job>"}.

2. Raw output: curl -s http://<target>/metrics | grep <metric>.

3. Dropped targets/metric relabelling.

4. Name or label changed in a new version?

5. Alert: absent(up{job="<job>"}).

Operational verification

code path runs → metric exposed → scraped → kept by relabel → stored

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it when panels show "No data" or alerts silently stop.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Query the raw metric without label filters. Compare with the target's /metrics output directly.

Step 2 Troubleshooting order Narrow the fault

1. Is the target up? up{job="x"} and the Targets page (scrape error message).

2. Does the endpoint return the metric? curl host:port/metrics | grep name.

3. Did the metric name or labels change after an upgrade?

4. Relabeling or metric_relabel_configs dropping it?

5. Service discovery still finding the target (labels/annotations changed)?

6. For pushed data (OTLP/remote write): collector or backend errors and dropped counters.

Use absent(metric) alerts for critical metrics.

Step 3 Common failures Narrow the fault

Library upgrades often rename metrics (for example adding _total). An alert on a missing series never fires. Time range or data source variables on the dashboard can point at the wrong environment.

Key points

Absence doesn't trigger normal alerts — use absent() or up == 0. Check target status, then the raw /metrics output.

Key checks
  • up{job="<job>"} — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid
ReferenceWhat it is1 section · depth on demand

How it works

Data can vanish at each step: the application stops exposing it, discovery drops the target, relabelling removes labels, or the query uses labels that no longer exist.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Follow the data path, stop at the first break

StepCheckPoints at
1. DiscoveryStatus → Service Discovery: target listed? dropped?SD config, relabel keep, RBAC
2. Scrapeup{job="x"}, Targets page error textNetwork, TLS, auth, wrong port/path, timeout
3. Expositioncurl -s http://target:port/metrics \| grep metric_nameApp not exposing it, renamed metric
4. Ingestionscrape_samples_scraped, scrape_samples_post_metric_relabeling, sample limit errorsmetric_relabel_configs drop, sample_limit
5. QueryMetric without label filters; correct time range; stalenessTypo, label changed, data older than 5 min
6. Remote storeSame query against Prometheus vs long-term storeRemote write lag or drops

Classic causes

SymptomCause
Metric existed until an upgradeClient library renamed it (e.g. _total suffix, OpenTelemetry . → _ conversion, units added)
Gaps in graphsScrape timeouts (scrape_duration_seconds near scrape_timeout), target restarts
Series ends 5 minutes after the target vanishedStaleness handling — expected
Only some pods have itAnnotation or label missing on part of the Deployment
Present in Prometheus, missing in GrafanaData source, variable filter or $__rate_interval problem

Alerting on absence

An alert on error_ratio > 0.05 is silent when the metric disappears. Add explicit absence alerts:

up{job="checkout"} == 0                       # target exists but scrape fails
absent(up{job="checkout"})                    # target gone from discovery entirely
absent_over_time(backup_last_success_timestamp_seconds[26h])   # push/textfile metrics that stopped

absent() returns a series only when nothing matches, so it needs a selector specific enough to identify the thing that should exist.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Target down but no alert on up == 0.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
missing metricsmissing metrics prometheusabsent alert
Confirmation

Confirm action

Continue?