ribbybibby / ssl_exporter

Exports Prometheus metrics for TLS certificates
Apache License 2.0
525 stars 99 forks source link

Monitor certs on tcp endpoints with SAN given? #87

Closed KlavsKlavsen closed 2 years ago

KlavsKlavsen commented 2 years ago

Can this monitor certs on none-active loadbalancer? I have 2 loadbalancers - both have copy of certs - but sometimes the copy to secondary fails and I'd like to monitor this. What I do now (old icinga setup) is to simply tell my https checker to use ip of 'localhost' - and set Host: header to the domain I want to check cert for (its a standard https checker) and it then instructs SSL layer that SNI name is the hostname set in Host header and this works great for overriding what IP it goes to - for checking if the domain cert.

ribbybibby commented 2 years ago

You can set the tls_config.server_name parameter in a custom module configuration. See an example of that here.