My smart home is based on ioBroker, InfluxDB, Grafana 7.1 and lots of sensors and switches communicating using Zigbee and MQTT. InfluxDB is the memory of all this, currently at 1.8.9.
To prepare for switching up to Influx 2, I would like to convert all my queries to Flux using this setup, and this works already for simple graph queries.
One issue I have is this: I have a lot of temperature / humitity sensors which fill the database via ioBroker. In the old setup I created an InfluxQL query for each sensor seperately, styled the graph manually and this was a LOT of manual work.
I would now like to store aliases for my measurements somewhere central where I can access them from anywhere using Flux to label my measurements better in any visualization. For example, “deconz.0.Sensors.13.temperature” might be “Living Room Temperature”, and “deconz.0.Sensors.8.temperature” might be “Basement Temperature”.
Hello @Jens,
I think you could either 1) use either map() or set() or rename() to rename the tag values or columns depending on your schema and what you prefer:
Or you could take advantage of dashboard variables and query for individual rooms:
I what you’re really looking for relates to this feature request though:
Using variables directly in queries seems like the way to go here. I commented on this feature request.
I don’t want to keep labeling everything in every dashboard I create, there must be some central way to define aliases.