hatman
June 21, 2021, 8:12pm
1
How do I have a 2 dropdowns in grafana were dropdown1 determines the values that are present in dropdown2?
Below example
I want 2 dropdowns in grafana
dropdown1:
site1
site2
site3
dropdown2:
hosta
hostb
hostc
hostd
hoste
hostf
hostg
hosth
hosti
when site1 is selected in dropdown1
dropdown2 shows the following:
hosta
hostb
hostc
when site2 is selected in dropdown1
dropdown2 shows the following:
hostd
hoste
hostf
when site3 is selected in dropdown1
dropdown2 shows the following:
hostg
hosth
hosti
What Grafana version and what operating system are you using?
7.5.7
What are you trying to achieve?
as above
How are you trying to achieve it?
as above
What happened?
n/a
What did you expect to happen?
n/a
Can you copy/paste the configuration(s) that you are having problems with?
n/a
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
n/a
Did you follow any online instructions? If so, what is the URL?
n/a
others related
Hi
Is it possible to pre-fill the dropdown menu? Let’s say I click and open the dropdown menu and want it to be already filled with i.e. sensor 1, sensor 2, sensor 3 etc… instead of having to remember the names and write them manually?
[image]
In my Grafana dashboard, I need to use 2 dropdowns and 2nd dropdown value should populate based on 1st dropdown value selection.
Example: 1st dropdown values: A,B,C
2nd dropdown: If “A” is selected, 2nd dropdown should show “100,150,200,250”.
if “B” is selected, 2nd dropdown should show “300,350,400,450”
if “C” is selected, 2nd dropdown should show “500,550,600,650”
Can someone please suggest how to make this conditional dropdown in grafana.
Hi
Is it possible to pre-fill the dropdown menu? Let’s say I click and open the dropdown menu and want it to be already filled with i.e. sensor 1, sensor 2, sensor 3 etc… instead of having to remember the names and write them manually?
[image]
put them into tables in db
and use nested/chain variable concept to handle the ‘one drop down determines the values of the other’
1 Like
hatman
June 21, 2021, 11:03pm
3
for ref
here
here
here
here
this is what I want but this is for influxdb
1 Like
hatman
June 23, 2021, 1:51am
4
tks, but can I do it using static data? that is if the association(e.g. site1 = hosta, hostb and hostc…) is set up in the db yet? that is using a custom variable and not a query variable.
Set up your 1st drop-down variable (for my example the Name of the variable is “System”) :
select DISTINCT sys_name from STATIC_SYS_INFO
Then use the results of that to screen only what you want in the seconds variable:
select DISTINCT cpu_id from STATIC_SYS_INFO where sys_name="[[System]]"
hatman
June 23, 2021, 7:58pm
6
tks but I think that is for influxDB? I am looking for doing it with a static list like in my example and also doing it with prometheus.
not sure how if you want it as a static data (not static table)
sorry
system
Closed
June 21, 2022, 8:12pm
8
This topic was automatically closed after 365 days. New replies are no longer allowed.