diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go index dab3314..b5b00bd 100644 --- a/internal/monitoring/monitor.go +++ b/internal/monitoring/monitor.go @@ -281,12 +281,13 @@ func ensureClusterEndpointURL(raw string) string { } func clusterEndpointEffectiveURL(endpoint config.ClusterEndpoint) string { - if endpoint.Host != "" { - return ensureClusterEndpointURL(endpoint.Host) - } + // Prefer IP address to avoid excessive DNS lookups if endpoint.IP != "" { return ensureClusterEndpointURL(endpoint.IP) } + if endpoint.Host != "" { + return ensureClusterEndpointURL(endpoint.Host) + } return "" }