Zabbix 6.0
Agent2
I am trying to connect to a Mosquitto MQTT server using tls but it's not working
When I use a MQTT Client (MQTT Explorer) I can connect rhough tls without any problems.
When I use a python script using paho-mqtt I also can connect without any problem but have to provide a link to the ca.crt present on the Mosquitto server
Do I have to define the location of the mqtt client certificate somewhere in the zabbix_agent2.conf or /etc/zabbix/zabbix_agent2.d/plugins.d/mqtt.conf?
Google search and even chatGPT are not able to help me to solve this problem or point me in the right direction.
I also tried the none tls Mosquitto (:1883) and that works without any problems in zabbix.
I'm running out of options to solve the tls problem. Please help.
Agent2
I am trying to connect to a Mosquitto MQTT server using tls but it's not working
Code:
2023/02/02 20:17:34 adding new request for key: 'mqtt.get[tls://mosquitto:8883,$SYS/broker/uptime/#,user,password]' 2023/02/02 20:17:34 created watcher task for plugin MQTT 2023/02/02 20:17:34 created configurator task for plugin MQTT 2023/02/02 20:17:34 plugin MQTT: executing configurator task 2023/02/02 20:17:34 plugin MQTT: executing watcher task 2023/02/02 20:17:34 [MQTT] creating client for [tls://mosquitto:8883] 2023/02/02 20:17:34 [MQTT] creating new subscriber on topic '$SYS/broker/uptime/#' for [tls://mosquitto:8883] 2023/02/02 20:18:04 [MQTT] cannot establish connection to [tls://mosquitto:8883]: timed out while connecting
When I use a python script using paho-mqtt I also can connect without any problem but have to provide a link to the ca.crt present on the Mosquitto server
Do I have to define the location of the mqtt client certificate somewhere in the zabbix_agent2.conf or /etc/zabbix/zabbix_agent2.d/plugins.d/mqtt.conf?
Google search and even chatGPT are not able to help me to solve this problem or point me in the right direction.
I also tried the none tls Mosquitto (:1883) and that works without any problems in zabbix.
I'm running out of options to solve the tls problem. Please help.
Comment