mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
parent
c39eb3bacd
commit
b5d35c7e09
@ -27,6 +27,7 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/minio/madmin-go"
|
||||||
"github.com/minio/minio/internal/bucket/lifecycle"
|
"github.com/minio/minio/internal/bucket/lifecycle"
|
||||||
"github.com/minio/minio/internal/logger"
|
"github.com/minio/minio/internal/logger"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
@ -1614,9 +1615,15 @@ func getLocalDiskStorageMetrics() *MetricsGroup {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics = make([]Metric, 0, 50)
|
|
||||||
storageInfo, _ := objLayer.LocalStorageInfo(ctx)
|
storageInfo, _ := objLayer.LocalStorageInfo(ctx)
|
||||||
|
if storageInfo.Backend.Type == madmin.FS {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
metrics = make([]Metric, 0, 50)
|
||||||
for _, disk := range storageInfo.Disks {
|
for _, disk := range storageInfo.Disks {
|
||||||
|
if disk.Metrics == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
for apiName, latency := range disk.Metrics.APILatencies {
|
for apiName, latency := range disk.Metrics.APILatencies {
|
||||||
val := latency.(uint64)
|
val := latency.(uint64)
|
||||||
metrics = append(metrics, Metric{
|
metrics = append(metrics, Metric{
|
||||||
|
Loading…
Reference in New Issue
Block a user