Return errors in mongodb SSL/TLS configuration (#4066)
This commit is contained in:
parent
c7b3667ac4
commit
bf0c59f56c
|
@ -151,6 +151,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
|
||||||
|
|
Loading…
Reference in New Issue