Using a variable in a TSDB Metric Path

Hello,

I’m not sure if this is a supported feature or not, but I have a use case where I need to change the path of a metric query in a tsdb datasource query. Due to a large amount of metrics on the back end system, we need to specify a different path to the metric depending on the datacentre. For example;

DC1
system.dc1.cpu.load

DC2
system.dc2.cpu.load

I created a custom variable (datacentre) with two values; dc1,dc2

I then have a second variable (host) which will get a list of hosts for a metric (datasource query) with the path above, i.e.;
tag_values(system.$datacentre.cpu.load, host)
I have also tried using this format:
tag_values(system.[[datacentre]].cpu.load, host)

In both cases, instead of the metric path changing to ‘system.dc1.cpu.load’ it seems to treat it like an array of values. Using develop tools I see this is the query sent to the backend;
grafana/api/search/lookup?limit=3000&m=system.d{datacentre=c=*,datacentre=1.cpu.load,host}

Whereas I would expect it to look like this:
grafana/api/search/lookup?limit=3000&m=system.dc1.cpu.load,host

Is this a supported use-case? Or should I open a feature request for this?

Thanks!

What version of Grafana are you using? This should be fixed in 4.2