Hello everybody,
We are ingesting data from MQTT from a topic called “Ordenes”. This topic contains two fields: “Cliente” and “Fecha inicio orden”. Each field comes from two threads, so MQTT structures them as two separate objects.
Example:Topic Ordenes:
{
“Cliente”: “Valor1”,}
{
“Fecha inicio orden”: “Valor2”,
}
When using two consumers to ingest both fields separately it works. However, we want to ingest them synchronized so they have the same timestamp. How do we configure Telegraf to achieve this? Right now, we are trying to ingest them as if they were in the same object:
[[inputs.mqtt_consumer]]
Broker URLs for the MQTT server or cluster. To connect to multiple
servers = [“tcp://10.101.160.101:1883”]
Topics that will be subscribed to.
topics = [“Ordenes/#”]
qos = 0
data_format = “json_v2”
name_override = “Ordenes”
topic_tag = “”[inputs.mqtt_consumer.tags]
BucketDestino = “A_RAW”
[[inputs.mqtt_consumer.topic_parsing]]
data_format = “json_v2”
# topic = “SQLSERVER/#”
[[inputs.mqtt_consumer.json_v2]]
#timestamp_path = “Fecha inicio orden”
#timestamp_format = “RFC3339”
[[inputs.mqtt_consumer.json_v2.field]]
path = “Cliente”
type = “string”
[[inputs.mqtt_consumer.json_v2.field]]
path = “Fecha inicio orden”
type = “string”
Hope someone has an idea how to solve it. Maybe Telegraf cannot solve this type of problem.
Thanks in advance