My Mosquitto MQTT server is using SSL and I am not able to find any examples on how to write MQTT to Influxdb when you have a MQTT using SSL. Can someone please provide a full example?
It appears that you must have one of the ssl options set or the insecure_skip_verify must be true to enable SSL. I’ll open an issue on the issue tracker but in the meantime can you set insecure_skip_verify = true?
It should switch over to using ssl just by having insecure_skip_verify = true set, this disables cert verification so I think there is no purpose to also setting the ssl_ca. To answer your question though, use mqtt-ca.cert, the ssl_ca is the certificate for the key that has signed the MQTT certificate.
Thank you for the explanation, I have followed your instruction but keep getting different errors every time I restart the Telegraf service or reboot. No changes was made to the file when restarting.
Each line is a different restart or reboot:
E! Error parsing /etc/telegraf/telegraf.conf, line 2515: field corresponding to servers' is not defined in*system.SystemStats’
E! Error parsing /etc/telegraf/telegraf.conf, line 2546: field corresponding to data_format' is not defined in*system.SystemStats’
E! Error parsing /etc/telegraf/telegraf.conf, line 2519: field corresponding to connection_timeout' is not defined in*system.SystemStats’
E! Error parsing /etc/telegraf/telegraf.conf, line 2517: field corresponding to qos' is not defined in*system.SystemStats’
Here are the settings from the Telegraf.conf file:
I checked the logs and it looks like it’s working. Thank you so much for you help Daniel.
One more question, is there a way to make the error logs a bit more specific?