Json_v2 how to have all elements in "tags" object added as tags?

@cyril.jean for completeness, here the way to parse the input using the xpath parser

[[inputs.mqtt_consumer]]
  ...
  data_format = "xpath_json"

  xpath_native_types = true

  [[inputs.mqtt_consumer.xpath]]
    metric_name = "/name"
    timestamp = "/timestamp"
    timestamp_format = "unix_ms"
    field_selection = "/fields/*"
    tag_selection = "/tags/*"

2 Likes