You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You use InfluxDB tags as variables in Grafana and I would like to limit tags by time range selected there.
Using $timeFrame is supported for select InfluxDB queries but tags are returned by "SHOW TAGS" which doesn't support $timeFrame: influxdata/influxdb#5668
For example in the parameters of this variable I have old names of VMs that appear when they no longer exist following the selection of the time range
I tested the following query and it seems to work well (maybe to be optimized?) :
SHOW TAG VALUES FROM vsphere_vm_cpu WITH KEY=vmname WHERE "vcenter" =~ /$vcenter/ to SELECT DISTINCT("vmname") FROM (SELECT * FROM "vsphere_vm_cpu" WHERE $timeFilter AND "vcenter" =~ /$vcenter/)
The workaround appears to involve subqueries, and retrieves every point in the timeFilter -- grafana handles the de-dupe
SELECT "tag" FROM (SELECT "field", "tag" FROM "table" WHERE $timeFilter)
Could you fix this bug in all dashboards, please?
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered:
Hello
Can you imagine that I've fixed this six days ago on the grafana.com dashboards but never hit the commit button here? Look at the revision on monday the 11th: https://grafana.com/grafana/dashboards/8159/revisions
Now all the dashboards are here as well, let me know if that is what you are looking for, looks similar but not quite the same.
Hi,
You use InfluxDB tags as variables in Grafana and I would like to limit tags by time range selected there.
Using $timeFrame is supported for select InfluxDB queries but tags are returned by "SHOW TAGS" which doesn't support $timeFrame: influxdata/influxdb#5668
For example in the parameters of this variable I have old names of VMs that appear when they no longer exist following the selection of the time range
I tested the following query and it seems to work well (maybe to be optimized?) :
SHOW TAG VALUES FROM vsphere_vm_cpu WITH KEY=vmname WHERE "vcenter" =~ /$vcenter/
toSELECT DISTINCT("vmname") FROM (SELECT * FROM "vsphere_vm_cpu" WHERE $timeFilter AND "vcenter" =~ /$vcenter/)
The workaround appears to involve subqueries, and retrieves every point in the timeFilter -- grafana handles the de-dupe
SELECT "tag" FROM (SELECT "field", "tag" FROM "table" WHERE $timeFilter)
Could you fix this bug in all dashboards, please?
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: