mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 12:40:24 +03:00
Better reporting of total/free usable capacity of the cluster (#15230)
The current code uses approximation using a ratio. The approximation can skew if we have multiple pools with different disk capacities. Replace the algorithm with a simpler one which counts data disks and ignore parity disks.
This commit is contained in:
+2
-2
@@ -577,7 +577,7 @@ func storageMetricsPrometheus(ch chan<- prometheus.Metric) {
|
||||
"Total usable capacity online in the cluster",
|
||||
nil, nil),
|
||||
prometheus.GaugeValue,
|
||||
GetTotalUsableCapacity(server.Disks, s),
|
||||
float64(GetTotalUsableCapacity(server.Disks, s)),
|
||||
)
|
||||
// Report total usable capacity free
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
@@ -586,7 +586,7 @@ func storageMetricsPrometheus(ch chan<- prometheus.Metric) {
|
||||
"Total free usable capacity online in the cluster",
|
||||
nil, nil),
|
||||
prometheus.GaugeValue,
|
||||
GetTotalUsableCapacityFree(server.Disks, s),
|
||||
float64(GetTotalUsableCapacityFree(server.Disks, s)),
|
||||
)
|
||||
|
||||
// MinIO Offline Disks per node
|
||||
|
||||
Reference in New Issue
Block a user