What Grafana version and what operating system are you using?
Grafana v9.5.0-cloud.5
What are you trying to achieve?
I have various dashboards for the data coming from influxdb. I want to create the dropdown menu for the different tags in my influxdata source, so that i can select one or two or all to view the data in different tags.
How are you trying to achieve it?
I am trying to achieve this using variables in dashboard settings. There are many options, among them i tried query options which didnot return my tags but returns values or nothing all the time. I am using flux query in every dashboards. So each dashboards has data for each tags in influx instead of that i want to select tag from dropwdown menu.
I did create custom variable where i include my tags manually. now when i select the tag in the dropdown menu created using custom variable it didn’t work.
What happened?
What did you expect to happen?
If you notice the influxsb UI i am looking for similar dropdown menu where i can select different tags and visualize it in dashboads. Suppose right now in my dashboard i have data from all user with all tags, i want to select some user and some tags in that dashboard using dropdown menu. I
Can you copy/paste the configuration(s) that you are having problems with?
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Did you follow any online instructions? If so, what is the URL?
Thank you much for the reply. Yes for example i got the dropdown menu suposse of my tag “projectnumber”, but i select any one of them in the dropdown menu i still see the data from all the projectnumber in the dashboards. How do i solve this? thank you much again
thank you very very much. This works when i select item in a tag but the thing when i select select two poject number in a tag called projectnumber it says nodata.
How can we solve this?
May be there was bit problem with loading the dashboard as soon as i configure the variables i made in the current dashboard.
Other dashboard without the use of the variable are loaded fine but with this its really slow.
contains() function is way to slow! If performance is an Issue, I recommend avoiding it at all costs.
what I do, is I build entirely the “filter” piece of the code, using another chained variable that makes another query using Variable1, then with reduce function and some trickery I reduce all my “selected values” to one single string.
then in my main query I use the “filter” like this:
|> filter(fn: (r) => ${Variable2})
Note, I cannot give a general piece of code because it is kind of specific to your data set, and you may need to add some “dummy” values in case the query returns a “null” string because. |> filter(fn: (r) => ) will get you an error