I receive a record from Kafka in JSON as the following example:
{
“measurement”: “serialized”,
“time”: 1710794594123456789,
“component”: “22”,
“field”: “acc_x”,
“value”: 33.77
}
The “field” field is generic and will vary depending on the Kafka record.
The “value” field is the value of the “field”.
The “component” field is the tag.
I want to write to InfluxDB according to the example converted into InfluxDB line protocol:
serialized,component=22 acc_x=33.77 1710794594123456789
// Syntax
[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] []
I tried several configurations in the telegraf.conf file.
None of them worked.