A target shows `DOWN` on `/targets` with `Get "http://10.0.3.14:9100/metrics": context deadline exceeded`
BeginnerTroubleshootingPrometheus scraping and targets
Answer
Likely causes → The exporter is too slow to answer inside scrape_timeout (default 10s), a security group / NetworkPolicy drops packets, or the host is overloaded.
Diagnose →
time curl -s -o /dev/null -w '%{http_code}\n' http://10.0.3.14:9100/metrics
# from inside the Prometheus pod/host
kubectl exec -n monitoring prometheus-k8s-0 -c prometheus -- wget -qO- -T 5 http://10.0.3.14:9100/metrics | head
Check scrape_duration_seconds{instance="10.0.3.14:9100"} against the timeout.
Fix → Open the port (SG/NACL/NetworkPolicy), disable slow collectors (e.g. node_exporter --no-collector.hwmon on hosts where it hangs), or raise scrape_timeout (must stay ≤ scrape_interval).
Prevent → Alert on up == 0 and on scrape_duration_seconds > 0.8 * scrape_timeout.
More on Prometheus scraping and targets
Target 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`IntermediateA target is `UP` but `/targets` shows `expected a valid start token, got "<" ("INVALID") while parsing: "<"`Intermediate