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
This commit is contained in:
Aliaksandr Valialkin 2021-04-07 23:33:40 +03:00
parent 5a0938d807
commit cb12a8f0a8

View file

@ -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()