danielqsj / kafka_exporter

Kafka exporter for Prometheus
Apache License 2.0
2.09k stars 602 forks source link

allow insecureSkipTlsVerify with certificates #433

Open iFission opened 3 months ago

iFission commented 3 months ago

use case: skip hostname verification

code allows for both insecureSkipTlsVerify and certs: https://github.com/danielqsj/kafka_exporter/blob/2e60c05d09b934c477e86426c36a59b2e40a90c1/kafka_exporter.go#L215

        config.Net.TLS.Config = &tls.Config{
            ServerName:         opts.tlsServerName,
            InsecureSkipVerify: opts.tlsInsecureSkipTLSVerify,
        }