Search code examples
influxdbgrafana

Influxdb Numbered Tag Sort


I am using Influxdb with Grafana and Telegraf.

With the following Query in Influxdb:

  show tag values from myTable with key = myInd

And the Result is

    key value
    --- -----
   myInd    0
   myInd    1
   myInd    10
   myInd    11
   myInd    2

How do I get the sorting to display this in order 0, 1, 2 instead of 0,1,10,11,2 ?

This will also me with my Grafana table to sort it the columns in serie when I use Group by myInd.


Solution

  • Influxdb uses the tags as String and therefore are sorted as Strings.