Can you make your variables dynamically changing?

After some searches i am still not sure if this is possible, what i would want is to make dynamic graphs on a dashboard using templating.

For that purpose i can use variables which contain other variables, so i can avoid things like this, where i can select more than a core on a cpu_value like /boot or /dev which makes no sense. I already have the host variable like this where i can see the host of a provided client as a filter.
You can see both of this cases in this image:

The problem with using variables into variables is when in this case i want to change a client, the host field does not get updated with the new set of values of the changed client.

So the question here is… Is there a way to make this variables “requery” on update of the dependant variable? So when i change the client, the list of host from this new client is refreshed and i can select a new host.
Right now with the provided options i was not able to make this behaviour happen.

Thanks guys :slight_smile:

yes, just use the variable in the query that way they get linked. So whenever you change a variable that is used in another variable query it will cause it to update as well.

Well, its not working, but i think it is an influx issue, thanks anyway.

I solved the influx issue, but in fact is not working as expected, i cannot get the values dynamically.

Example series:

select * from interface_rx
name: interface_rx
time cliente epoch host instance interval type value


1507550092000000000 CLIENTEA 1507550090.449 nologin-Lenovo-M30-70 br-785d73b45ec8 10.000 if_errors 0
1507550092000000000 CLIENTEA 1507550090.449 nologin-Lenovo-M30-70 wlp2s0 10.000 if_packets 0
1507550092000000000 CLIENTEA 1507550090.449 nologin-Lenovo-M30-70 br-785d73b45ec8 10.000 if_packets 39049
1507550092000000000 CLIENTEA 1507550090.449 nologin-Lenovo-M30-70 enp1s0 10.000 if_errors 0
1507550092000000000 CLIENTEA 1507550090.449 nologin-Lenovo-M30-70 veth330af0a 10.000 if_packets 38966
1507550092000000000 CLIENTEA 1507550090.449 nologin-Lenovo-M30-70 veth330af0a 10.000 if_octets 2106930

There should be a list of network interfaces to select:

The query runs fine on influx:

SHOW TAG VALUES FROM “interface_rx” WITH KEY IN (“instance”)
name: interface_rx
key value


instance br-785d73b45ec8
instance docker0
instance enp1s0
instance lo
instance veth330af0a
instance veth68e7e62
instance veth71a27a1
instance vethca9f737
instance wlp2s0

Any ideas?

Got it working, it was the variable measurement definition:

SHOW TAG VALUES WITH KEY = "cliente"
SHOW TAG VALUES WITH KEY = “host” WHERE cliente =~ /^$cliente$/
show measurements
SHOW TAG VALUES FROM /^$measurement$/ WITH KEY IN (“type”)
SHOW TAG VALUES FROM /^$measurement$/ WITH KEY IN (“type_instance”)
SHOW TAG VALUES FROM /^$measurement$/ WITH KEY IN (“instance”)