Telegraf JSON v2 Topic Parsing

1.2k Views Asked by At

I want to combine the topic to a single field. Currently I am trying this:

 data_format = "json_v2"
  [[inputs.mqtt_consumer.json_v2]]
    [[inputs.mqtt_consumer.topic_parsing]]
      topic = "+/+/+/"
      tags = "name/id/value"
      fields = "name/id/_"
    [[inputs.mqtt_consumer.json_v2.tag]]
      path = "timestamp" 

But it will split it into name and id, but it should combine both to a new string and save that one.

0

There are 0 best solutions below