Fractal Techware

Alert runbooks /

PrometheusSDRefreshFailure

A polling-based service discovery mechanism in Prometheus is repeatedly failing to fetch its list of targets.

   
Severity warning
Source Prometheus’ own /metrics (2.x and 3.x)
Key metric prometheus_sd_refresh_failures_total (labels mechanism, config)

What it means

Mechanisms such as ec2, azure, gce, dns, http, openstack and several others poll an API on an interval. When a refresh errors, Prometheus keeps the last successful target list and increments the failure counter. The alert fires when failures keep recurring over a longer window.

Nothing breaks immediately. But new instances are not scraped, terminated ones linger as down targets, and if Prometheus restarts while discovery is broken it starts with no targets at all for that job.

Common causes

First checks

  1. Identify the failing mechanism and job:
    sum by (instance, mechanism, config) (increase(prometheus_sd_refresh_failures_total[30m])) > 0
    
  2. Read the error:
    kubectl -n monitoring logs <prometheus-pod> -c prometheus | grep -iE "discovery|refresh"
    
  3. Compare what is currently discovered in Status → Service discovery, or:
    prometheus_sd_discovered_targets{config="<job>"}
    
  4. Reproduce the call from the Prometheus pod, for example:
    kubectl -n monitoring exec <prometheus-pod> -c prometheus -- nslookup <dns-sd-name>
    kubectl -n monitoring exec <prometheus-pod> -c prometheus -- wget -qO- http://<http-sd-endpoint>
    
  5. For cloud mechanisms, verify the identity in use has the needed read permissions (check the cloud audit log for denied calls).

Fixing it

Restore credentials or permissions, fix the DNS record or HTTP SD endpoint, or open the network path. If you are being rate limited, raise refresh_interval or narrow the query with filters so fewer API calls are needed. Once refreshes succeed, confirm the discovered target count matches reality.