mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
Add cluster audit metrics in metrics-v3 (#19514)
endpoint: /minio/metrics/v3/cluster/audit metrics: - failed_messages (counter) - total_messages (counter) - target_queue_length (gauge)
This commit is contained in:
@@ -43,6 +43,7 @@ const (
|
||||
clusterUsageObjectsCollectorPath collectorPath = "/cluster/usage/objects"
|
||||
clusterUsageBucketsCollectorPath collectorPath = "/cluster/usage/buckets"
|
||||
clusterErasureSetCollectorPath collectorPath = "/cluster/erasure-set"
|
||||
clusterAuditCollectorPath collectorPath = "/cluster/audit"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -218,6 +219,15 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
loadClusterErasureSetMetrics,
|
||||
)
|
||||
|
||||
clusterAuditMG := NewMetricsGroup(clusterAuditCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
auditFailedMessagesMD,
|
||||
auditTargetQueueLengthMD,
|
||||
auditTotalMessagesMD,
|
||||
},
|
||||
loadClusterAuditMetrics,
|
||||
)
|
||||
|
||||
allMetricGroups := []*MetricsGroup{
|
||||
apiRequestsMG,
|
||||
apiBucketMG,
|
||||
@@ -230,6 +240,7 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
||||
clusterUsageObjectsMG,
|
||||
clusterUsageBucketsMG,
|
||||
clusterErasureSetMG,
|
||||
clusterAuditMG,
|
||||
}
|
||||
|
||||
// Bucket metrics are special, they always include the bucket label. These
|
||||
|
||||
Reference in New Issue
Block a user