ribbybibby / ssl_exporter

Exports Prometheus metrics for TLS certificates
Apache License 2.0
507 stars 95 forks source link

date expire from pem or crt files #40

Closed Nurlan199206 closed 3 years ago

Nurlan199206 commented 4 years ago

It's possible to checks date expire from pem or crt files?

ribbybibby commented 4 years ago

Hi @Nurlan199206. This exporter doesn't directly support scraping certificate metrics from files but what you could do is serve the files and then scrape them that way.

For instance:

$ openssl s_server -cert tls.crt -key tls.key -accept 8443
Using auto DH parameters
Using default temp ECDH parameters
ACCEPT

This will serve tls.crt on port 8443, which will allow you to probe it on <server IP>:8443.