influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.6k stars 5.56k forks source link

MQTT connected, But no write to influxdb #7767

Closed MengLinyang closed 4 years ago

MengLinyang commented 4 years ago

conf: [[inputs.mqtt_consumer]] servers = ["tcp://127.0.0.1:1883"] topics = [ "topic-test123", "#" ]

topic_tag = "topic-test"

qos = 0 connection_timeout = "30s" max_undelivered_messages = 1000 persistent_session = true client_id = "test-telegraf" username = "mytelegraf" password = "test" insecure_skip_verify = false data_format = "json"

log: G:\telegraf-1.14.3_windows_amd64\telegraf>telegraf.exe -config telegraf.conf 2020-07-01T09:25:36Z I! Starting Telegraf 1.14.3 2020-07-01T09:25:36Z I! Loaded inputs: mqtt_consumer 2020-07-01T09:25:36Z I! Loaded aggregators: 2020-07-01T09:25:36Z I! Loaded processors: printer 2020-07-01T09:25:36Z I! Loaded outputs: influxdb 2020-07-01T09:25:36Z I! Tags enabled: host=PC-LIN 2020-07-01T09:25:36Z I! [agent] Config: Interval:5s, Quiet:false, Hostname:"PC-LIN", Flush Interval:5s 2020-07-01T09:25:36Z I! [inputs.mqtt_consumer] Connected [tcp://127.0.0.1:1883]

connected but no write

same conf worked success under EMQX, mosquitto. success log: mqtt_consumer,host=PC-LIN,topic=topic-test t=27.11,h=46.22 1593594380633448700

topic : topic-test data : {"t":27.11,"h":46.22}

danielnelson commented 4 years ago

same conf worked success under EMQX, mosquitto.

So then is there a particular broker that this is not working with?