From 262b0afda7a0161d3ee4b3dafdcc085128b215df Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Sat, 13 Jan 2018 09:32:49 +0000 Subject: [PATCH] Make gateway compatible with Prometheus 1.0 and 2.0 Signed-off-by: Alex Ellis --- gateway/metrics/prometheus_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/metrics/prometheus_query.go b/gateway/metrics/prometheus_query.go index 68925bbf..8ccd81b7 100644 --- a/gateway/metrics/prometheus_query.go +++ b/gateway/metrics/prometheus_query.go @@ -30,7 +30,7 @@ func NewPrometheusQuery(host string, port int, client *http.Client) PrometheusQu // Fetch queries aggregated stats func (q PrometheusQuery) Fetch(query string) (*VectorQueryResponse, error) { - req, reqErr := http.NewRequest(http.MethodGet, fmt.Sprintf("http://%s:%d/api/v1/query/?query=%s", q.Host, q.Port, query), nil) + req, reqErr := http.NewRequest(http.MethodGet, fmt.Sprintf("http://%s:%d/api/v1/query?query=%s", q.Host, q.Port, query), nil) if reqErr != nil { return nil, reqErr }