{"action":"closed","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/2544","labels_url":"https://api.github.com/repos/grafana/grafana/issues/2544/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/2544/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/2544/events","html_url":"https://github.com/grafana/grafana/issues/2544","id":101633269,"number":2544,"title":"Templating: set an variable based on another variable","user":{"login":"liyichao","id":2576762,"avatar_url":"https://avatars.githubusercontent.com/u/2576762?v=3","gravatar_id":"","url":"https://api.github.com/users/liyichao","html_url":"https://github.com/liyichao","followers_url":"https://api.github.com/users/liyichao/followers","following_url":"https://api.github.com/users/liyichao/following{/other_user}","gists_url":"https://api.github.com/users/liyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/liyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liyichao/subscriptions","organizations_url":"https://api.github.com/users/liyichao/orgs","repos_url":"https://api.github.com/users/liyichao/repos","events_url":"https://api.github.com/users/liyichao/events{/privacy}","received_events_url":"https://api.github.com/users/liyichao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-18T11:20:59Z","updated_at":"2015-08-18T12:14:36Z","closed_at":"2015-08-18T12:14:36Z","body":"For example I have series\r\n\r\nhost.test1\r\nhost2.test1\r\nhost2.test2\r\n\r\nI would like to make a dashboard where all metrics like host2.* to display on a graph. I make a templating variable named $host to discover all host and user can select host to see all metrics from the host. It is good.\r\n\r\nBut what if the user do not know the host. He only knows `test1`. Of course I can make `host.*` as an variable $hostAndMetric, but that way I can not graph all metrics of a host on one graph now. Because $hostAndMetric will be equal to, say, host2.test2, I do not want the `test2` part.\r\n\r\nI think of one solution that If I can choose one variable, and another variable will be auto set using regex or something (like what grafana does now towards what data source returns), I can use the processed variable in my graph."}}