Return errors in mongodb SSL/TLS configuration (#4066)

(cherry picked from commit bf0c59f56c)
This commit is contained in:
Daniel Nelson 2018-04-23 13:29:12 -07:00 committed by Daniel Nelson
parent cd1c2e9cd8
commit a877b06d74
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 3 additions and 0 deletions

View File

@ -149,6 +149,9 @@ func (m *MongoDB) gatherServer(server *Server, acc telegraf.Accumulator) error {
} else { } else {
tlsConfig, err = internal.GetTLSConfig( tlsConfig, err = internal.GetTLSConfig(
m.SSLCert, m.SSLKey, m.SSLCA, m.InsecureSkipVerify) m.SSLCert, m.SSLKey, m.SSLCA, m.InsecureSkipVerify)
if err != nil {
return err
}
} }
// If configured to use TLS, add a dial function // If configured to use TLS, add a dial function