Scrape errors show `body size limit exceeded`
IntermediateTroubleshootingPrometheus scraping and targets
Answer
Likely causes → body_size_limit is set on the job and the exporter response grew past it, usually due to a new high-cardinality metric.
Diagnose →
curl -s http://app:8080/metrics | wc -c
curl -s http://app:8080/metrics | grep -v '^#' | cut -d'{' -f1 | sort | uniq -c | sort -rn | head
Fix → Remove the offending labels in the app, or drop them via metric_relabel_configs. Only raise the limit once the growth is understood.
Prevent → Keep body_size_limit and sample_limit on every job as a guardrail.
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