mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: Prometheus metrics to re-use storage disks (#11647)
also re-use storage disks for all `mc admin server info` calls as well, implement a new LocalStorageInfo() API call at ObjectLayer to lookup local disks storageInfo also fixes bugs where there were double calls to StorageInfo()
This commit is contained in:
@@ -1231,9 +1231,9 @@ func (sys *NotificationSys) ServerInfo() []madmin.ServerProperties {
|
||||
info, err := client.ServerInfo()
|
||||
if err != nil {
|
||||
info.Endpoint = client.host.String()
|
||||
info.State = "offline"
|
||||
info.State = string(madmin.ItemOffline)
|
||||
} else {
|
||||
info.State = "ok"
|
||||
info.State = string(madmin.ItemOnline)
|
||||
}
|
||||
reply[idx] = info
|
||||
}(client, i)
|
||||
@@ -1306,7 +1306,7 @@ func GetPeerOnlineCount() (nodesOnline, nodesOffline int) {
|
||||
nodesOffline = 0
|
||||
servers := globalNotificationSys.ServerInfo()
|
||||
for _, s := range servers {
|
||||
if s.State == "ok" {
|
||||
if s.State == string(madmin.ItemOnline) {
|
||||
nodesOnline++
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user