0
this is my first question, so please do not stone me to death I am running a smarthome stack containing mqtt, telegraf, influxdb2 and grafana8 using bme280 sensors. everything is running smoothly after some problems but i am having some issues renaming the legend in my grafana dashboard.
my flux query
from(bucket: "bme280")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "mqtt_consumer")
|> filter(fn: (r) => r["topic"] == "sensors/bk/temp" or r["topic"] == "sensors/sz/temp" or r["topic"] == "sensors/wz/temp")
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")
results in a nice graph however i donβt like the legend which is
- value {host="raspi", topic="sensors/bk/temp"}
- value {host="raspi", topic="sensors/sz/temp"}
- value {host="raspi", topic="sensors/wz/temp"}
it should display
- Temperature Balcony
- Temperature Sleeping room
- Temperature living room
i can get around changing the βvalueβ tag to something else using
|> set(key: "value", value: "temperature")
but the part in β{}β is not covered. Is there any way to remove this part or at least change it? See Picture
Furthermore: Im not that good with querying language. Thus iβm using the influxdb2 visual builder to complete queries and copy them into grafana. Is there a leaner way? (beside diving deeper into flux)
Thank you and BR