Add logger webhook metrics in metrics-v3 (#19515)

endpoint: /minio/metrics/v3/cluster/webhook
metrics:
- failed_messages (counter)
- online (gauge)
- queue_length (gauge)
- total_messages (counter)
This commit is contained in:
Shireesh Anjal
2024-05-14 12:57:33 +05:30
committed by GitHub
parent 3c5f2d8916
commit 3bab4822f3
4 changed files with 88 additions and 5 deletions
+12 -1
View File
@@ -52,7 +52,8 @@ const (
clusterNotificationCollectorPath collectorPath = "/cluster/notification"
clusterIAMCollectorPath collectorPath = "/cluster/iam"
auditCollectorPath collectorPath = "/audit"
auditCollectorPath collectorPath = "/audit"
loggerWebhookCollectorPath collectorPath = "/logger/webhook"
)
const (
@@ -295,6 +296,15 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
loadClusterIAMMetrics,
)
loggerWebhookMG := NewMetricsGroup(loggerWebhookCollectorPath,
[]MetricDescriptor{
webhookFailedMessagesMD,
webhookQueueLengthMD,
webhookTotalMessagesMD,
},
loadLoggerWebhookMetrics,
)
auditMG := NewMetricsGroup(auditCollectorPath,
[]MetricDescriptor{
auditFailedMessagesMD,
@@ -322,6 +332,7 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
clusterIAMMG,
auditMG,
loggerWebhookMG,
}
// Bucket metrics are special, they always include the bucket label. These