From cb12a8f0a8ac9979d9e0382707a3c8e2e65b4ddd Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 7 Apr 2021 23:33:40 +0300 Subject: [PATCH] app/vmselect: return `data:null` instead of `data:[]` from `/api/v1/query_exemplars`, since Grafana throws an error otherwise Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1186 --- app/vmselect/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/main.go b/app/vmselect/main.go index f6e86facc..cdf21b952 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -372,7 +372,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { // Return dumb placeholder for https://prometheus.io/docs/prometheus/latest/querying/api/#querying-exemplars queryExemplarsRequests.Inc() w.Header().Set("Content-Type", "application/json; charset=utf-8") - fmt.Fprintf(w, "%s", `{"status":"success","data":[]}`) + fmt.Fprintf(w, "%s", `{"status":"success","data":null}`) return true case "/api/v1/admin/tsdb/delete_series": deleteRequests.Inc()