[[inputs.mqtt_consumer]]
data_format = "xpath_json"
servers = ["tcp://127.0.0.1:1883"]
topics = ["telegraf/host01/cpu", "telegraf/+/mem", "sensors/#"]
xpath_native_types = true

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