Using topic as a part of name

Hi,

I am trying to use topics that are collected with mqtt_consumer as a part of name. I tried to achieve that with processors.override but I don’t know how to get topic value.

thanks in advance

The mqtt_consumer plugin will write the topic name as the topic tag. Can you explain a little bit more about what you want to do with that tag?

Yes, I want to somehow use the tag value as a part of the name. I am storing data in RedisTimeseries and it is saving sensors data in for example “mqtt_consumer_temperature”, but i want to be able to separate sensors data per sensor using topic, so I want to achieve TOPIC => value

You can directly use the rename processor to take the tag value and set it as the name.

RedisTimeseries

Keep in mind this output will take the metric name and append the metric field name as you have their mqtt_consumer + temperature to generate the series name, see here