mirror of https://github.com/minio/minio.git
add missing available space from metrics (#10065)
This commit is contained in:
parent
7342b5355f
commit
d3c81a6e93
|
@ -142,12 +142,13 @@ func getDisksInfo(disks []StorageAPI, endpoints []string) (disksInfo []madmin.Di
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
di := madmin.Disk{
|
di := madmin.Disk{
|
||||||
Endpoint: endpoints[index],
|
Endpoint: endpoints[index],
|
||||||
DrivePath: info.MountPath,
|
DrivePath: info.MountPath,
|
||||||
TotalSpace: info.Total,
|
TotalSpace: info.Total,
|
||||||
UsedSpace: info.Used,
|
UsedSpace: info.Used,
|
||||||
UUID: info.ID,
|
AvailableSpace: info.Free,
|
||||||
State: diskErrToDriveState(err),
|
UUID: info.ID,
|
||||||
|
State: diskErrToDriveState(err),
|
||||||
}
|
}
|
||||||
if info.Total > 0 {
|
if info.Total > 0 {
|
||||||
di.Utilization = float64(info.Used / info.Total * 100)
|
di.Utilization = float64(info.Used / info.Total * 100)
|
||||||
|
|
Loading…
Reference in New Issue