mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 20:50:22 +03:00
Add system CPU metrics to metrics-v3 (#19560)
endpoint: /minio/metrics/v3/system/cpu metrics: - minio_system_cpu_avg_idle - minio_system_cpu_avg_iowait - minio_system_cpu_load - minio_system_cpu_load_perc - minio_system_cpu_nice - minio_system_cpu_steal - minio_system_cpu_system - minio_system_cpu_user
This commit is contained in:
@@ -36,6 +36,7 @@ const (
|
||||
systemNetworkInternodeCollectorPath collectorPath = "/system/network/internode"
|
||||
systemDriveCollectorPath collectorPath = "/system/drive"
|
||||
systemMemoryCollectorPath collectorPath = "/system/memory"
|
||||
systemCPUCollectorPath collectorPath = "/system/cpu"
|
||||
systemProcessCollectorPath collectorPath = "/system/process"
|
||||
systemGoCollectorPath collectorPath = "/system/go"
|
||||
|
||||
@@ -128,6 +129,20 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
loadMemoryMetrics,
|
||||
)
|
||||
|
||||
systemCPUMG := NewMetricsGroup(systemCPUCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
sysCPUAvgIdleMD,
|
||||
sysCPUAvgIOWaitMD,
|
||||
sysCPULoadMD,
|
||||
sysCPULoadPercMD,
|
||||
sysCPUNiceMD,
|
||||
sysCPUStealMD,
|
||||
sysCPUSystemMD,
|
||||
sysCPUUserMD,
|
||||
},
|
||||
loadCPUMetrics,
|
||||
)
|
||||
|
||||
systemDriveMG := NewMetricsGroup(systemDriveCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
driveUsedBytesMD,
|
||||
@@ -235,6 +250,7 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
systemNetworkInternodeMG,
|
||||
systemDriveMG,
|
||||
systemMemoryMG,
|
||||
systemCPUMG,
|
||||
|
||||
clusterHealthMG,
|
||||
clusterUsageObjectsMG,
|
||||
|
||||
Reference in New Issue
Block a user