Add TLS support to the memcached exporter
This is based on, and pending, the changes in gomemcache PR https://github.com/grobie/gomemcache/pull/2.
The original non-TLS behaviour is unchanged, however when --tls.enable is given, the net connection is created by the crypto/tls module instead of the net module.
The PR follows a similar setup to the TLS code in amtool and made cert/key/ca/servername/insecure-skip-verify configurable. The ServerName defaults to the provided address which seems a sensible default. During testing, verification of the server certificates was expecting an IP SAN even when a hostname is provided as the connection address, hence the default.
This should probably use the exporter toolkit.
Take a look at https://github.com/prometheus/haproxy_exporter/pull/205 for an example.
@SuperQ thanks for the pointer! I think that's already implemented here? https://github.com/prometheus/memcached_exporter/blob/master/cmd/memcached_exporter/main.go#L39
The PR is to enable TLS connections between exporter -> memcached. Not Prometheus -> exporter.
Hi, we are looking into this issue recently. Is this something we can help unblock soon? If not, we are happy to have a new pr and get this feature in.
Continued and merged in #153