Make error loading tls config fatal in mysql input
This commit is contained in:
parent
704c6c01eb
commit
d1cbf4598c
|
@ -147,7 +147,7 @@ func (m *Mysql) Gather(acc telegraf.Accumulator) error {
|
||||||
|
|
||||||
tlsConfig, err := internal.GetTLSConfig(m.SSLCert, m.SSLKey, m.SSLCA, false)
|
tlsConfig, err := internal.GetTLSConfig(m.SSLCert, m.SSLKey, m.SSLCA, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("E! MySQL Error registering TLS config: %s", err)
|
return fmt.Errorf("registering TLS config: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if tlsConfig != nil {
|
if tlsConfig != nil {
|
||||||
|
|
Loading…
Reference in New Issue