diff --git a/pkg/exporter/server.go b/pkg/exporter/server.go index 915fa9a..2e9a608 100644 --- a/pkg/exporter/server.go +++ b/pkg/exporter/server.go @@ -145,8 +145,9 @@ func (c *ServerCollector) Collect(ch chan<- prometheus.Metric) { privateIP = *server.PrivateIP } - if server.PublicIP != nil { - publicIP = server.PublicIP.Address.String() + for _, ip := range server.PublicIPs { + publicIP = ip.Address.String() + break } labels := []string{