From ef776f120b1164d8e1cc9bd652ee105f36d1eac3 Mon Sep 17 00:00:00 2001
From: Daniel Nelson <daniel.nelson@influxdb.com>
Date: Fri, 19 Jan 2018 12:16:28 -0800
Subject: [PATCH] Make error loading tls config fatal in mysql input

---
 plugins/inputs/mysql/mysql.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/inputs/mysql/mysql.go b/plugins/inputs/mysql/mysql.go
index 1e75bf6b..d15f4610 100644
--- a/plugins/inputs/mysql/mysql.go
+++ b/plugins/inputs/mysql/mysql.go
@@ -147,7 +147,7 @@ func (m *Mysql) Gather(acc telegraf.Accumulator) error {
 
 	tlsConfig, err := internal.GetTLSConfig(m.SSLCert, m.SSLKey, m.SSLCA, false)
 	if err != nil {
-		log.Printf("E! MySQL Error registering TLS config: %s", err)
+		return fmt.Errorf("registering TLS config: %s", err)
 	}
 
 	if tlsConfig != nil {
-- 
GitLab