Influxdb2, data formatting and plugin configuration
maxdd opened this issue · comments
Hi,
i noticed this plugin after struggling with worldmap-panel.
I admit there is a little bit of confusion between the two in the sense that i have no idea what are the differences nor which of this is maintained.
In any case i have a influxdb2 setup with grafana and i'm using a python script with influxdb-client which create a point
p = Point(measurement_name).tag("key", ISO) \
.tag("latitude", Lat) \
.tag("longitude", Long) \
.tag("Domain", Domain) \
.tag("City", City) \
.tag("State", State) \
.tag("Country", Country) \
.tag("IP", IP) \
.field("Domain", Domain) \
.field("latitude", Lat) \
.field("longitude", Long) \
.field("City", City) \
.field("State", State) \
.field("key", ISO) \
.field("name", Country) \
.field("IP", IP) \
.field("duration", duration) \
.field("metric", 1)
I've tried different combinations of queries e.g.
from(bucket: "npm-graf")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "ReverseProxyConnections" and r["_field"] == "IP")
|> group(columns: ["IP", "latitude", "longitude"], mode:"by")
|> count(column: "_value")
but i have yet to find a way to make it work (i've just started with grafana).
Long story short is there/can you provide a clear example that shows how the timeseries/table should be (e.g. influxdb table) and how the panel shall be configured?
Regards,
Any help?