Telegraf xpath array data type

Hello,

I have the following configuration for reading data from a topic in MQTT and ingesting it into influx.

I am using xpath for taking the right position in the Json path but I have detected that when an array comes, it is ingested in the database and also registered in my debug output in a different way:

  • Input: [1, 2, 3]
  • Output: [1 2 3]

My config:

Data format to consume.

Each data format has its own unique set of configuration options, read

more about them here:

telegraf/docs/DATA_FORMATS_INPUT.md at master · influxdata/telegraf · GitHub

data_format = “xpath_json”

xpath_allow_empty_selection = true
xpath_native_types = true

[[inputs.mqtt_consumer.xpath]]
metric_selection = “//Payload/*”
metric_name = “name(/)”
timestamp = “SourceTimestamp”
timestamp_format = “2006-01-02T15:04:05.9999999Z”
field_selection = “Value”

Is it normal this behaviour? Can I do something to avoid that transformation?

Regards