A target disappeared from `/targets` entirely after a config change
BeginnerTroubleshootingPrometheus scraping and targets
Answer
Likely causes → A relabel_configs keep/drop rule filtered it, the reload failed silently, or service discovery no longer finds it.
Diagnose → Open /service-discovery in the UI: dropped targets are listed with their discovered labels. Then:
promtool check config /etc/prometheus/prometheus.yml
curl -s localhost:9090/api/v1/status/config | head
Check prometheus_config_last_reload_successful.
Fix → Correct the relabel regex (anchored by default: regex: web does not match web-1), fix the config and reload with curl -X POST localhost:9090/-/reload (needs --web.enable-lifecycle).
Prevent → Run promtool check config in CI and alert on prometheus_config_last_reload_successful == 0.
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