`up` is 1 but a specific metric is missing from the target
BeginnerTroubleshootingPrometheus scraping and targets
Answer
Likely causes → The app has not registered the metric yet (lazy init until first event), a metric_relabel_configs rule dropped it, or the name changed in a library upgrade (e.g. _total suffix added).
Diagnose →
curl -s http://app:8080/metrics | grep -i request
Compare with the metric_relabel_configs of the job.
Fix → Initialise counters at zero for known label values in code, fix the drop rule, update queries to the new name.
Prevent → Pre-initialise metrics and test exposition in CI.
More on Prometheus scraping and targets
A target shows `DOWN` on `/targets` with `Get "http://10.0.3.14:9100/metrics": context deadline exceeded`BeginnerTarget is `DOWN` with `server returned HTTP status 401 Unauthorized`BeginnerTarget shows `server returned HTTP status 403 Forbidden` when scraping kubelet / cAdvisorIntermediateTarget is `DOWN` with `connect: connection refused`BeginnerTarget shows `x509: certificate signed by unknown authority`IntermediateTarget shows `x509: certificate is valid for app.svc, not 10.0.4.22`Intermediate