system version
ubuntu 20.04
InfluxDB v2.6.1
Telegraf 1.25.0
Hello,
I used to use json with mqtt consumer telegraf plugin and everything works fine.
Now I want to replace json with protobuf, but It seem like telegraf don’t push the data into DB
Here is my .proto file and Telegraf config.
syntax = 'proto3';
package flight_information_proto;
message GPS {
optional float LAT = 1;
optional float LON = 2;
optional float ALT = 3;
}
message flight_information_message {
GPS gps = 1;
optional float heading = 2;
}
[[inputs.mqtt_consumer]]
data_format = "xpath_protobuf"
xpath_protobuf_file = "flight_information.proto"
xpath_protobuf_type = "flight_information_proto.flight_information_message"
xpath_print_document = true
I don’t see any error messages
$telegraf --config http://192.168.50.118:8086/api/v2/telegrafs/0a88aefd497fa000
2023-02-07T09:19:21Z I! Starting Telegraf 1.25.0
2023-02-07T09:19:21Z I! Available plugins: 228 inputs, 9 aggregators, 26 processors, 21 parsers, 57 outputs, 2 secret-stores
2023-02-07T09:19:21Z I! Loaded inputs: mqtt_consumer
2023-02-07T09:19:21Z I! Loaded aggregators:
2023-02-07T09:19:21Z I! Loaded processors:
2023-02-07T09:19:21Z I! Loaded secretstores:
2023-02-07T09:19:21Z I! Loaded outputs: influxdb_v2
2023-02-07T09:19:21Z I! Tags enabled: host=tony
2023-02-07T09:19:21Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"tony", Flush Interval:10s
2023-02-07T09:19:21Z I! [inputs.mqtt_consumer] Connected [tcp://192.168.50.118:1883]
There doesn’t seem to be any messages uploaded to DB.
Inaddtion, Telegraf is not able to read more than one type. what should I do if I have more than one type?