Hi there,
I am using Telegraf 1.14.0 with enabled MQTT consumer. The configuration as it follows:
# # Read metrics from MQTT topic(s) [[inputs.mqtt_consumer]] # ## MQTT broker URLs to be used. The format should be scheme://host:port, # ## schema can be tcp, ssl, or ws. servers = [ "tcp://192.168.1.109:1883", "tcp://192.168.1.27:1883", ] topics = [ "nexus433/#", "openweather/web/temperature", "speedtest/network/state", ] # # ## Data format to consume. # ## Each data format has its own unique set of configuration options, read # ## more about them here: # ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md data_format = "json"
I have two MQTT brokers that are running on a different raspberry pi. The payload that is coming from from the first (192.168.1.109) MQTT is
{ “temperature”: 29.3, “humidity”: 41, “battery”: “100”, “quality”: 66 }
and from the second (192.168.1.27) is
{ “temperature”: 23.4, “humidity”: 53, “battery”: “100”, “quality”: 100, “id”: 113, “channel”: 1 }
So the payload is fairly similar with the exception of two extra values in the second case. When I start telegraf I ma getting the following error:
2020-05-27T16:02:53Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ‘o’ looking for beginning of value
and the data from the second broker is never pushed to InfluxDB whereas the data from the first one is getting saved into InfluxDB with no problem. I was trying to use only second MQTT broker but the error is still the same.
The both hosts have the same version of mosquitto MQTT. I run out of ideas what is wrong and where problem could be.