Add cluster IAM metrics in metrics-v3 (#19595)

Signed-off-by: Bala.FA <bala@minio.io>
This commit is contained in:
Bala FA
2024-05-02 13:50:42 +05:30
committed by GitHub
parent 402a3ac719
commit e5b16adb1c
3 changed files with 102 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ const (
clusterErasureSetCollectorPath collectorPath = "/cluster/erasure-set"
clusterAuditCollectorPath collectorPath = "/cluster/audit"
clusterNotificationCollectorPath collectorPath = "/cluster/notification"
clusterIAMCollectorPath collectorPath = "/cluster/iam"
)
const (
@@ -278,6 +279,22 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
loadClusterNotificationMetrics,
)
clusterIAMMG := NewMetricsGroup(clusterIAMCollectorPath,
[]MetricDescriptor{
lastSyncDurationMillisMD,
pluginAuthnServiceFailedRequestsMinuteMD,
pluginAuthnServiceLastFailSecondsMD,
pluginAuthnServiceLastSuccSecondsMD,
pluginAuthnServiceSuccAvgRttMsMinuteMD,
pluginAuthnServiceSuccMaxRttMsMinuteMD,
pluginAuthnServiceTotalRequestsMinuteMD,
sinceLastSyncMillisMD,
syncFailuresMD,
syncSuccessesMD,
},
loadClusterIAMMetrics,
)
allMetricGroups := []*MetricsGroup{
apiRequestsMG,
apiBucketMG,
@@ -294,6 +311,7 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
clusterErasureSetMG,
clusterAuditMG,
clusterNotificationMG,
clusterIAMMG,
}
// Bucket metrics are special, they always include the bucket label. These