I realize that this thread is almost a year old. However, I thought, I might add one more solution that I just found.
I used the “Transform” feature in the Grafana query editor and more specifically the “Rename by regex” function. (See Transformation functions | Grafana documentation)
For example:
I’d like to plot temperature values as well and I my data is returned like this:
temperature {domain="sensor", entity_id="temperatursensor_arbeitszimmer_temperature"}
Using the regex .*temperatursensor_(.+)_temperature.*
(not exactly elegant, I know) I’m able to extract the value that I want.
I just got into InfluxDB and have no idea about the possibilities of the Flux query language yet. It’s quite likely that there is an elegant way to do this in Flux…