Move /cluster/audit to /audit (#19708)

As the audit metrics are server level and not 
overall cluster level.
This commit is contained in:
Shireesh Anjal
2024-05-10 20:20:39 +05:30
committed by GitHub
parent 9667a170de
commit 60d7e8143a
3 changed files with 30 additions and 21 deletions

View File

@@ -48,9 +48,10 @@ const (
clusterUsageObjectsCollectorPath collectorPath = "/cluster/usage/objects"
clusterUsageBucketsCollectorPath collectorPath = "/cluster/usage/buckets"
clusterErasureSetCollectorPath collectorPath = "/cluster/erasure-set"
clusterAuditCollectorPath collectorPath = "/cluster/audit"
clusterNotificationCollectorPath collectorPath = "/cluster/notification"
clusterIAMCollectorPath collectorPath = "/cluster/iam"
auditCollectorPath collectorPath = "/audit"
)
const (
@@ -264,15 +265,6 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
loadClusterErasureSetMetrics,
)
clusterAuditMG := NewMetricsGroup(clusterAuditCollectorPath,
[]MetricDescriptor{
auditFailedMessagesMD,
auditTargetQueueLengthMD,
auditTotalMessagesMD,
},
loadClusterAuditMetrics,
)
clusterNotificationMG := NewMetricsGroup(clusterNotificationCollectorPath,
[]MetricDescriptor{
notificationCurrentSendInProgressMD,
@@ -299,6 +291,15 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
loadClusterIAMMetrics,
)
auditMG := NewMetricsGroup(auditCollectorPath,
[]MetricDescriptor{
auditFailedMessagesMD,
auditTargetQueueLengthMD,
auditTotalMessagesMD,
},
loadAuditMetrics,
)
allMetricGroups := []*MetricsGroup{
apiRequestsMG,
apiBucketMG,
@@ -313,9 +314,10 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
clusterUsageObjectsMG,
clusterUsageBucketsMG,
clusterErasureSetMG,
clusterAuditMG,
clusterNotificationMG,
clusterIAMMG,
auditMG,
}
// Bucket metrics are special, they always include the bucket label. These