Approach used to get DISTINCT tag values

Since DISTINCT is not available for querying tag values, how does one query a measurement to get, for example, a list of unique server names. Trying to setup a Grafana query variable of the server names that can be used in our datacenter management dashboard.

Thanks…

k.

Oh, also. Since you can’t query tags without including at least one field, how do you get a list of distinct server names?

In Grafana, we can use template to show distinct servernames.
Influxdb query like this:
SHOW TAG VALUES FROM m WITH KEY = “servername”

1 Like

Thanks zqq. Does it matter that the template returns both the key and the value? Is Grafana smart enough to add the value to the list of variables?