I need a 2 dimensional template variable

I have a need to repeat graphs that each show results for 2 hosts. The graphs will be using the zabbix plugin, is there any way to get this result? I’ve tried using a sql query as my variables that returns two columns but grafana seems to just throw them all in the same bucket. Maybe some fancy regex?

Is this not possible?

Sorry, the above was meant as a response to a different question. Not sure how I managed to post it here…

What about this

Another option is a query that can create a key/value variable. The query should return two columns that are named __text and __value . The __text column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allows you to have a friendly name as text and an id as the value. An example query with hostname as the text and id as the value:

SELECT hostname AS __text, id AS __value FROM my_host
1 Like