Setup Telegraf for MQTT

Hi,

i want to use telegraf together with influxdb to get all my IoT Values from our MQTT Server. For this, i setup a docker container for influxdb and a container for telegraf. I try to access the MQTT server via :8883 and username/password but i get everytime this error messages:

2024-07-05T11:54:09Z E! [telegraf] Error running agent: starting input inputs.mqtt_consumer: network Error : read tcp 172.17.0.6:43702->10.130.153.82:8883: read: connection reset by peer

If i try to access via port 1883 the connection is etablished. But there are just the basic topics from the server and not this topics which i want to access.
Also if i try to access via port 8883 and a different client everything is working. Does anybody get a idea what the problem ist?

Thanks & Regards

Does your MQTT URL look like this?

   servers = ["ssl://10.130.153.82:8883"]

No, unfortunality not :frowning:

I changed it today and get know this error

2024-07-08T11:54:28Z E! [telegraf] Error running agent: starting input inputs.mqtt_consumer: network Error : tls: failed to verify certificate: x509: cannot validate certificate for 10.130.153.82 because it doesn't contain any IP SANs

So i insert

insecure_skip_verify = true

and finally i get no more error and telegraf told that mqtt consumer is connected. Know i just wait for some data