From e4faa1ac22277a62a4b17eb9dc13525287f14d02 Mon Sep 17 00:00:00 2001 From: Nate Franzen Date: Thu, 13 Sep 2018 19:03:11 -0700 Subject: [PATCH] suffix _count --- metrics/metrics.go | 3 ++- origin/metrics.go | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/metrics/metrics.go b/metrics/metrics.go index 4b6156ab..131ab174 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -32,7 +32,8 @@ func ServeMetrics(l net.Listener, shutdownC <-chan struct{}, logger *logrus.Logg WriteTimeout: 10 * time.Second, } - http.Handle("/metrics", promhttp.Handler()) + metricsPath := "/metrics" + http.Handle(metricsPath, promhttp.Handler()) wg.Add(1) go func() { diff --git a/origin/metrics.go b/origin/metrics.go index 9ade5148..665c4fe1 100644 --- a/origin/metrics.go +++ b/origin/metrics.go @@ -94,7 +94,7 @@ func InitializeTunnelMetrics(commonLabelKeys []string) *TunnelMetrics { // not a labelled vector haConnections := prometheus.NewGauge( prometheus.GaugeOpts{ - Name: "argo_ha_connections", + Name: "argo_ha_connection_count", Help: "Number of active HA connections", }, ) @@ -103,14 +103,14 @@ func InitializeTunnelMetrics(commonLabelKeys []string) *TunnelMetrics { // not a labelled vector timerRetries := prometheus.NewGauge( prometheus.GaugeOpts{ - Name: "argo_timer_retries", + Name: "argo_timer_retry_count", Help: "Unacknowledged heart beats count", }) prometheus.MustRegister(timerRetries) requests := prometheus.NewCounterVec( prometheus.CounterOpts{ - Name: "argo_http_request", + Name: "argo_http_request_count", Help: "Count of requests", }, labelKeys, @@ -119,7 +119,7 @@ func InitializeTunnelMetrics(commonLabelKeys []string) *TunnelMetrics { responses := prometheus.NewCounterVec( prometheus.CounterOpts{ - Name: "argo_http_response", + Name: "argo_http_response_count", Help: "Count of responses", }, append(labelKeys, statusKey),