mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Add cluster scanner metrics in metrics-v3 (#19517)
endpoint: /minio/metrics/v3/cluster/scanner metrics: - bucket_scans_finished (counter) - bucket_scans_started (counter) - directories_scanned (counter) - last_activity_nano_seconds (gauge) - objects_scanned (counter) - versions_scanned (counter)
This commit is contained in:
@@ -58,6 +58,7 @@ const (
|
||||
loggerWebhookCollectorPath collectorPath = "/logger/webhook"
|
||||
replicationCollectorPath collectorPath = "/replication"
|
||||
notificationCollectorPath collectorPath = "/notification"
|
||||
scannerCollectorPath collectorPath = "/scanner"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -351,6 +352,18 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
loadClusterConfigMetrics,
|
||||
)
|
||||
|
||||
scannerMG := NewMetricsGroup(scannerCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
scannerBucketScansFinishedMD,
|
||||
scannerBucketScansStartedMD,
|
||||
scannerDirectoriesScannedMD,
|
||||
scannerObjectsScannedMD,
|
||||
scannerVersionsScannedMD,
|
||||
scannerLastActivitySecondsMD,
|
||||
},
|
||||
loadClusterScannerMetrics,
|
||||
)
|
||||
|
||||
loggerWebhookMG := NewMetricsGroup(loggerWebhookCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
webhookFailedMessagesMD,
|
||||
@@ -389,6 +402,7 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
clusterReplicationMG,
|
||||
clusterConfigMG,
|
||||
|
||||
scannerMG,
|
||||
auditMG,
|
||||
loggerWebhookMG,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user