[[inputs.nats_consumer]]
  servers = ["nats://localhost:4222"]
  subjects = ["telegraf"]
  jetstream_subjects = ["js_telegraf"]
  queue_group = "telegraf_consumers"
  data_format = "xpath_json"
  xpath_native_types = true

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