ExternalDNSMetricsMissing#
Alert is triggered when external_dns_controller_last_sync_timestamp_seconds metric is missing from Prometheus-cluster.
This alert either indicates that:
-
External-dns does not return the
external_dns_controller_last_sync_timestamp_secondsmetric -
Or Prometheus-cluster does not scrape external-dns's metrics.
Troubleshooting Hints#
NAMESPACE=external-dns
Case: External-dns does not return metrics#
To check if external-dns metrics are available:
kubectl get svc -n ${NAMESPACE} # service should be present
kubectl port-forward svc/external-dns -n ${NAMESPACE} 7979:7979 &
curl -sL https://localhost:7979/metrics
curl -sL https://localhost:7979/metrics | grep external_dns_controller_last_sync_timestamp_seconds
If metrics are not available, try to find the reason by checking status/logs of external-dns:
kubectl get pod -n ${NAMESPACE} -l app.kubernetes.io/name=external-dns
kubectl logs -n ${NAMESPACE} -l app.kubernetes.io/name=external-dns
Case: Prometheus-cluster does not scrape external-dns's metrics#
-
check status/logs of Prometheus
kubectl get pods -n monitoring | grep prometheus kubectl logs <prometheus_pod> -n monitoring -
check that the servicemonitor is present
kubectl get servicemonitor -n ${NAMESPACE} external-dns -
check the target, by doing a port-forward on the Prometheus-cluster
kubectl -n monitoring get svc -l app=kube-prometheus-stack-prometheus kubectl -n monitoring port-forward svc/<prometheus_svc> 12345:9090 &Connect to http://localhost:12345/targets, search
external-dnstarget, and verify error message.Warning
Be careful of clear selection before filtering on
external-dns.