inputs.mysql plugin tls=custom causes error
Bug report
Relevant telegraf.conf:
[[inputs.mysql]] servers = [ "username:password@tcp(ipaddress:3306)/?tls=custom" ] ssl_ca = "/etc/telegraf/ca.pem" ssl_cert = "/etc/telegraf/cert.pem" ssl_key = "/etc/telegraf/key.pem"
System info:
Telegraf docker image version 1.5.1 Centos 7
Steps to reproduce:
- ... In telegraf.conf, under [inputs.mysql] servers specify tls=custom
Expected behavior:
[username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify|custom]] Mysql Plugin uses custom ssl/tsl configuration
Actual behavior:
Error in plugin [inputs.mysql]: invalid value / unknown config name: custom
Any chance you see an error like: E! MySQL Error registering TLS config: before this error?
Good catch @danielnelson - once I fixed the permissions issue on ca.pem, we were good to go! Can close this out.
Might be worth making the "Error in plugin [inputs.mysql]: invalid value / unknown config name: custom" a bit clearer though?
I made the earlier error fatal so you won't get to this second error, if a ssl configuration is specified in the configuration then we will require it to be loadable. https://github.com/influxdata/telegraf/commit/ef776f120b1164d8e1cc9bd652ee105f36d1eac3