diff --git a/cmd/notification.go b/cmd/notification.go index 998f4d42a..e255b8464 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -1239,6 +1239,21 @@ func (sys *NotificationSys) ServerInfo() []madmin.ServerProperties { }(client, i) } wg.Wait() + + for i := range reply { + for j := range globalEndpoints { + for _, endpoint := range globalEndpoints[j].Endpoints { + if reply[i].Endpoint == endpoint.Host { + reply[i].PoolNumber = j + 1 + } else if host, err := xnet.ParseHost(reply[i].Endpoint); err == nil { + if host.Name == endpoint.Hostname() { + reply[i].PoolNumber = j + 1 + } + } + } + } + } + return reply } diff --git a/pkg/madmin/info-commands.go b/pkg/madmin/info-commands.go index 50d5ab1c9..45debe06f 100644 --- a/pkg/madmin/info-commands.go +++ b/pkg/madmin/info-commands.go @@ -265,13 +265,14 @@ type ErasureBackend struct { // ServerProperties holds server information type ServerProperties struct { - State string `json:"state,omitempty"` - Endpoint string `json:"endpoint,omitempty"` - Uptime int64 `json:"uptime,omitempty"` - Version string `json:"version,omitempty"` - CommitID string `json:"commitID,omitempty"` - Network map[string]string `json:"network,omitempty"` - Disks []Disk `json:"drives,omitempty"` + State string `json:"state,omitempty"` + Endpoint string `json:"endpoint,omitempty"` + Uptime int64 `json:"uptime,omitempty"` + Version string `json:"version,omitempty"` + CommitID string `json:"commitID,omitempty"` + Network map[string]string `json:"network,omitempty"` + Disks []Disk `json:"drives,omitempty"` + PoolNumber int `json:"poolNumber,omitempty"` } // Disk holds Disk information