Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Prefer IP addresses over hostnames for cluster communication

rcourtman350828a260f7
diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go
index dab33148fc..b5b00bd1d1 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 ""
}