Hi all -
I’m trying to achieve a multi-result state timeline with data sourced from a query, using a custom key:value dashboard variable.
Grafana v9.5.21
Datasource Influx-DB
My variable node_ids_state looks as follows:
m000 : 5db76d7635868c1f85fd45bbd3bb838a,m001 : 3a756eff845006f589a1ff981125a677,...
The key represents a device-name, the value holds the id which is used as tag for Influx-DB time-series.
My goal is a state-timeline showing results from a (or multiple) query, labeled with the device-name. See example below:
My actual query is looking like this:
SELECT "str" FROM "autogen"."nodes_hist" WHERE ("nodeId" =~ /${node_ids_state:pipe}/) AND $timeFilter Group BY nodeId order by time DESC LIMIT 10000
Which queries data for the given nodes but has obviously no relation to the device-name, giving the following result:
So what I basically need is to get the device-name from the dashboard-variable in the state-timeline.
Any idea?
Thanks and regards,
Oliver