I’m trying to create panel variable drop downs where the user can select a variable based on tags in the database. This query works:
SHOW TAG VALUES WITH KEY = “wlc”
However, that shows all of the keys for the tag “wlc” for all time. I’d like to narrow that down to the time range selected in the panel. I tried this:
SHOW TAG VALUES WITH KEY = “wlc” WHERE $timeFilter
Status of this is somewhat unclear, I have tested
SHOW TAG VALUES WITH KEY = “domain” WHERE $timeFilter
in Grafana v5.4.2 but I get:
“Template variables could not be initialized: error parsing query: missing parameter: timeFilter”
Anyone else that has tried this?
select "tag_name" from (select "field_value", "tag_name" from "table" WHERE "tag_name_filter" = 'tag_value_filter' AND $timeFilter group by "tag_name" LIMIT 1)
$timefilter variable will automatically use dashboard time range selected if variable uses refresh : on time range change