2024-07-31T09:08:19Z I! Loading config: /etc/telegraf/telegraf.conf
2024-07-31T09:08:19Z E! error loading config file /etc/telegraf/telegraf.conf: plugin inputs.mqtt_consumer: line 67: configuration specified the fields ["client_trace"], but they were not used. This is either a typo or this config option does not exist in this version.
and when I issue
mosquitto_pub -h 192.168.1.20 -p 1883 -t "Tempest_windrose/test" -u "blah" -P "blech" -m '{"wind_speed": 5.0, "wind_direction": 34}'
from another machine, I can see the message appear in the docker container. So we know that the docker container is allowing or has access to read and write to the mqtt server.
From everything I can find, publishing the message above should work. The data is in json format. The topic is correct. But there's absolutely nothing being logged in debug or on the console apart from the initial connection message.
Worse, this was all working fine 8 days ago. Telegraf hasn't changed, but the data being sent to the mqtt server may have changed, but I can't tell in what way!
This was fixed in #15670 after I accidently removed it while working on the mqtt output. You can use a nightly build, downgrade to v1.31, or wait for v1.32.3.
Relevant telegraf.conf
Logs from Telegraf
System info
ubuntu 23.10
Docker
moa@sophie:~$ cat docker_configs/grafana_suite.yml version: '3.9' services: telegraf: container_name: telegraf image: my-telegraf:July restart: unless-stopped privileged: true user: telegraf:993 network_mode: host labels:
Steps to reproduce
I
Expected behavior
additional and critically needed debug information on why absolutely nothing is happening or being reported/logged for mqtt_consumer.
Actual behavior
Telegraf won't start with this line in the config.
Additional info
telegraf@sophie:/$ telegraf --version Telegraf 1.31.0 (git: HEAD@fbfaba05)
The source for this version indicates that client_trace should work, but it doesn't.
Currently there's no way to know why mqtt_consumer is doing nothing. The debug logs show that it connects:
I know it's connecting because if I change the IP address in the telegraf conf, it logs that it couldn't connect. So it's connecting.
When I issue
mosquitto_sub -h 192.168.1.20 -p 1883 -t "Tempest_windrose/#" -u "blah" -P "blech" -v
from within the telegraf docker container, it lists:
and when I issue
mosquitto_pub -h 192.168.1.20 -p 1883 -t "Tempest_windrose/test" -u "blah" -P "blech" -m '{"wind_speed": 5.0, "wind_direction": 34}'
from another machine, I can see the message appear in the docker container. So we know that the docker container is allowing or has access to read and write to the mqtt server.
From everything I can find, publishing the message above should work. The data is in json format. The topic is correct. But there's absolutely nothing being logged in debug or on the console apart from the initial connection message.
Worse, this was all working fine 8 days ago. Telegraf hasn't changed, but the data being sent to the mqtt server may have changed, but I can't tell in what way!