Set a variable for just one panel

hi everyone, i have kind of hard question. I have a dashboard with many panels in it. i wanna set a variable just for one of these panels, not for all. is it possible??
thanks a lot!

Why it is hard question? Just create dashboard variable and use that dashboard variable only for that one particular panel.

Ok thanks per the reply. But how can i do that? I see that when i set a variable, it is for all the panel in the dashboard.

Just to clarify: dashboard variables are defined per dashboard, not per panel - that’s a reason, why they are always on the top - you can’t move them as panels

Any panel can (but don’t have to) use that dashboard variable(s). It can use 0, 1 or many of those dashboard variables.

I assume based on your confusion that you mean something different than you asked in the first post (wrong question = wrong answer).

I guess your actual question is: I want to have “panel” variable (visual select box):

  • which is defined on the panel level
  • which is visually on the panel level
  • which moves with that panel
  • which is accesible only by that panel
  • which can be used by any panel type

For example:


Answer: that’s not possible - see clarification

1 Like

Ok thank you for replying! I cannot set a variable for just one panel, but what if i want to remove some panels from the repeating? I set a variable, and i have all my panels; now my question is: can i remove some panels after setting a variable?

You can put, instead, the multi-value option for your variable.


And then select only the value you wanna repeat…
image

Please not that if you don’t want to have to reselect all the value each time. You can save your dashboard with the value of the variable by selecting Save current variable values as dashboard default:
image

1 Like

Hi! Thanks for the reply. I took a look to these options, but i don’t think that is helpful in my situation.
Now I will explain my case in details: I have 18 plants (cluster) that i want to repeat. I set a variable and it works fine. In each of these plants there are a certain number of services that i wanna monitor. I created one panel for each services. So, for each plant I have a “general” panel, and a certain number of others panel, one for each services.
Now I have the problem: the repeating variable work on the 18 plants, and also works on the single services. i don’t want that, because the plants don’t have the same service. I just want that for every plants i have the right services.

Are you using the row repeating option, or the panel repeating option?
I’ve never done that before, but maybe by combining the row repeat with the panel one you can achieve what you want?
Or you really just want to exclude specific values? I’m not sure but I think you can achieve that by using REGEX…

I’m using the panel repeating option. I’ve never used the row repeating, but I will try to combine them. My gol is having the rigth services in each plant, that’s all. If the plant X has 10 services, I wanna show just them.
Furthermore, Do you mean REGEX when i define the variable?

Could you provide us the output of your variable, if not an example?

I don’t think i can, it’s company staff.
Thanks anyway for your support

All good, I understand!
I think you can achieve what you want by using two variables.
One getting each of yours plants, and another one to get each services of each plants, for example:
working with InfluxDB, I have a variable to get my networks names:

SHOW TAG VALUES ON supervision FROM snmp WITH KEY = network

and then I get every routerIP from each network:

SHOW TAG VALUES ON supervision FROM snmp WITH KEY = agent_host WHERE network =~ /^$network$/

With this, I can configure repeat option row with the networks variable, and create panels that repeat for routerIP.

I think that might works if you iterate your row trough the plants variable, and then the panel trough the services variable… Let me know how it goes

Ok thanks again. I’ll try and I’ll let you know!!