The title is sub-optimal and I am pretty sure I am facing issues on both sides (Grafana and InfluxDB), but I have to start somewhere
What I am trying to achieve: creating a status panel in Grafana which shows the host name and a colour corresponding to the last value (which is an enum
) for each host.
The first problem I have is that with the Flux query
from(bucket: "telegraf")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "idrac-hosts")
|> filter(fn: (r) => r["_field"] == "psu-status")
|> group(columns: ["agent_host"])
|> last()
I get multiple tables with a single row:
Now I need to get this into a shape which is understood by the Grafana Status Panel, but canât manage to do it. For some reason (I am really struggling with flux
, only used the SQL-like backend before), the table plugin in Grafana shows multiple tables named âidrac-hostsâ and the status panel plugin shows only one big green tile.
Can anyone toss me into the right direction how to modify the query so that I get a single table with e.g. agent_name
and the _value
? I assume that such a table is needed for the Status Panel plugin, but still not sure.