Aliasing/mapping tag values

Grafana 7.3, data source InfluxDB. Panel as table, query:

SELECT count("field") FROM "dataset" WHERE field=-1 AND $timeFilter GROUP BY "tagname" fill(null)

It works as expected. tagnames are host codes. I’d like to change few, most common to human readable names. Now table look like:

Time Tagname Count
Date1 h-232-2 10
Date2 x-999-3 200
Date3 e-111-4 123

So I’d like map some of tagnames to more human friendly values, but only for few most common tagnames. For example:

  • x-999-3 → building A
  • e-111-4 → building B

Then table should look like

Time Tagname Count
Date1 h-232-2 10
Date2 building A 200
Date3 building B 123

So, for defined set of tag names should replace it with given value, other should be left untouched. Is this possible to do in Grafana?

OK, it is possible to do. Edit panel, in overrides add override for Tagname column. Use auto, and add override property → Key/value mapping Then You can enter human readable names.