From 77d5331e85962f5e00459c98f16137181ba08180 Mon Sep 17 00:00:00 2001 From: Shireesh Anjal <355479+anjalshireesh@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:49:40 +0530 Subject: [PATCH] Fix few wrongly defined metric types (#19586) `minio_cluster_webhook_queue_length` was wrongly defined as `counter` where-as it should be `gauge` Following were wrongly defined as `gauge` when they should actually be `counter`: - minio_bucket_replication_sent_bytes - minio_bucket_replication_received_bytes - minio_bucket_replication_total_failed_bytes - minio_bucket_replication_total_failed_count --- cmd/metrics-v2.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/metrics-v2.go b/cmd/metrics-v2.go index 42147786f..0b59164cb 100644 --- a/cmd/metrics-v2.go +++ b/cmd/metrics-v2.go @@ -907,7 +907,7 @@ func getRepFailedBytesTotalMD(namespace MetricNamespace) MetricDescription { Subsystem: replicationSubsystem, Name: totalFailedBytes, Help: "Total number of bytes failed at least once to replicate since server start", - Type: gaugeMetric, + Type: counterMetric, } } @@ -917,7 +917,7 @@ func getRepFailedOperationsTotalMD(namespace MetricNamespace) MetricDescription Subsystem: replicationSubsystem, Name: totalFailedCount, Help: "Total number of objects which failed replication since server start", - Type: gaugeMetric, + Type: counterMetric, } } @@ -927,7 +927,7 @@ func getRepSentBytesMD(namespace MetricNamespace) MetricDescription { Subsystem: replicationSubsystem, Name: sentBytes, Help: "Total number of bytes replicated to the target", - Type: gaugeMetric, + Type: counterMetric, } } @@ -951,7 +951,7 @@ func getRepReceivedBytesMD(namespace MetricNamespace) MetricDescription { Subsystem: replicationSubsystem, Name: receivedBytes, Help: helpText, - Type: gaugeMetric, + Type: counterMetric, } } @@ -3900,7 +3900,7 @@ func getWebhookMetrics() *MetricsGroupV2 { Subsystem: webhookSubsystem, Name: webhookQueueLength, Help: "Webhook queue length", - Type: counterMetric, + Type: gaugeMetric, }, VariableLabels: labels, Value: float64(t.Stats().QueueLength),