lib/influxutils: return response compatible with InfluxDB 1.8.4

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1124
This commit is contained in:
Aliaksandr Valialkin 2021-03-15 22:18:15 +02:00
parent acf2a82d3c
commit 37323c57c9

View file

@ -25,5 +25,5 @@ func WriteDatabaseNames(w http.ResponseWriter) {
for i := range dbNames {
dbs[i] = fmt.Sprintf(`[%q]`, dbNames[i])
}
fmt.Fprintf(w, `{"results":[{"name":"databases","columns":["name"],"series":[{"values":[%s]}]}]}`, strings.Join(dbs, ","))
fmt.Fprintf(w, `{"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[%s]}]}]}`, strings.Join(dbs, ","))
}