Describe the solution you'd like
In MQTTv5 it is possible to attach "user properties" to each message, which is simply a string=>string dictionary.
It would be very cool if these properties could be added as labels on the associated metric either instead of the topic label, or in addition to it.
Additional context
I have several devices that publish several metrics. Currently I encode device information (such as which room and which floor it is in) in the device name, which then becomes part of the topic name. As a result I have topics with names like homely/smoke_alarm_basement_hallway/networklinkstrength with a single value.
It's probably possible to do some relabeling tricks to extract that information out to separate labels when ingesting into prometheus, but it would be so much easier if mqtt-exporter would just set the labels from user properties instead.
If this sounds like a good idea, and nobody beats me to it, I might attempt a PR for it.
Describe the solution you'd like In MQTTv5 it is possible to attach "user properties" to each message, which is simply a string=>string dictionary. It would be very cool if these properties could be added as labels on the associated metric either instead of the topic label, or in addition to it.
Additional context I have several devices that publish several metrics. Currently I encode device information (such as which room and which floor it is in) in the device name, which then becomes part of the topic name. As a result I have topics with names like
homely/smoke_alarm_basement_hallway/networklinkstrength
with a single value. It's probably possible to do some relabeling tricks to extract that information out to separate labels when ingesting into prometheus, but it would be so much easier if mqtt-exporter would just set the labels from user properties instead.If this sounds like a good idea, and nobody beats me to it, I might attempt a PR for it.