From e8f92a4ee8635bbeae6096c83a3915ee3e5ee81f Mon Sep 17 00:00:00 2001 From: Edouard Hur <3418467+hekmon@users.noreply.github.com> Date: Mon, 10 Feb 2020 21:15:21 +0100 Subject: [PATCH] Cluster - prometheus metrics fix (#314) * add missing '/{}' in prom query range requests * fix missing leading '/' on prom lavelValuesErrors path --- app/vmselect/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index b3583ff47..de4674b83 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -311,12 +311,12 @@ func sendPrometheusError(w http.ResponseWriter, r *http.Request, err error) { var ( labelValuesRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/label/{}/values"}`) - labelValuesErrors = metrics.NewCounter(`vm_http_request_errors_total{path="select/{}/prometheus/api/v1/label/{}/values"}`) + labelValuesErrors = metrics.NewCounter(`vm_http_request_errors_total{path="/select/{}/prometheus/api/v1/label/{}/values"}`) queryRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/query"}`) queryErrors = metrics.NewCounter(`vm_http_request_errors_total{path="/select/{}/prometheus/api/v1/query"}`) - queryRangeRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/prometheus/api/v1/query_range"}`) + queryRangeRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/query_range"}`) queryRangeErrors = metrics.NewCounter(`vm_http_request_errors_total{path="/select/{}/prometheus/api/v1/query_range"}`) seriesRequests = metrics.NewCounter(`vm_http_requests_total{path="/select/{}/prometheus/api/v1/series"}`)