From 9ce3b7e1dde341f777600769c905e5a31b599389 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 d2ea27be27..344f9c38cb 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -451,7 +451,7 @@ func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request, // 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 default: return false