mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Add system memory metrics in v3 (#19486)
Following memory metrics will be added under /system/memory - available - buffers - cache - free - shared - total - used - used_perc
This commit is contained in:
@@ -35,6 +35,7 @@ const (
|
||||
|
||||
systemNetworkInternodeCollectorPath collectorPath = "/system/network/internode"
|
||||
systemDriveCollectorPath collectorPath = "/system/drive"
|
||||
systemMemoryCollectorPath collectorPath = "/system/memory"
|
||||
systemProcessCollectorPath collectorPath = "/system/process"
|
||||
systemGoCollectorPath collectorPath = "/system/go"
|
||||
|
||||
@@ -112,6 +113,20 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
loadNetworkInternodeMetrics,
|
||||
)
|
||||
|
||||
systemMemoryMG := NewMetricsGroup(systemMemoryCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
memTotalMD,
|
||||
memUsedMD,
|
||||
memFreeMD,
|
||||
memAvailableMD,
|
||||
memBuffersMD,
|
||||
memCacheMD,
|
||||
memSharedMD,
|
||||
memUsedPercMD,
|
||||
},
|
||||
loadMemoryMetrics,
|
||||
)
|
||||
|
||||
systemDriveMG := NewMetricsGroup(systemDriveCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
driveUsedBytesMD,
|
||||
@@ -209,6 +224,7 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
|
||||
systemNetworkInternodeMG,
|
||||
systemDriveMG,
|
||||
systemMemoryMG,
|
||||
|
||||
clusterHealthMG,
|
||||
clusterUsageObjectsMG,
|
||||
|
||||
Reference in New Issue
Block a user