wociscz / lxd-telegraf-stats

LXD containers metrics
24 stars 14 forks source link

Grafana dashoards broken with Influxdb 2.0 [convert influxql queries to flux] #6

Open 10101010101010001 opened 3 years ago

10101010101010001 commented 3 years ago

With the latest influxdb release they switched to flux query language. It appears that all that is needed is to update the Grafana dashboards, as the data is making it to influxdb. Could you update the dashboards to work with flux?

I've attempted to convert a few queries, not sure how correct they are.

--"query": "select \"name\" from \"lxd\" where time > now() - 15m", from(bucket: "lxd") |> range(start: -15m) |> keyValues(keyColumns: ["name"])

--"query": "SHOW TAG VALUES FROM \"lxd\" WITH KEY = \"instance\"", import "influxdata/influxdb/v1" v1.tagValues( bucket: "lxd", tag: "instance", predicate: (r) => true, start: -15m )

wociscz commented 3 years ago

Hi, Grafana dashboard in this repository is just for example/working for influx 1.x (not perfect dashboard either). Feel free to send a diff with influx 2.x dashboard changes. I've personally migrated to prometheus so I might add some prometheus exporter for this.

10101010101010001 commented 3 years ago

Hi, Grafana dashboard in this repository is just for example/working for influx 1.x (not perfect dashboard either). Feel free to send a diff with influx 2.x dashboard changes. I've personally migrated to prometheus so I might add some prometheus exporter for this.

That would be superb if you would.