ribbybibby / ssl_exporter

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

Exporting OCSP stapling information #52

Closed tykling closed 3 years ago

tykling commented 4 years ago

Hello, I am in need of an exporter to give information about OCSP stapling for TLS handshakes. Would you be interested in adding such a feature in ssl_exporter? I need the this_update/produced_at/next_update times/ages to monitor the freshness of OCSP stapling in my TLS servers.

ribbybibby commented 4 years ago

I'm always interested in expanding the usefulness of this exporter 😄 . It seems like the OCSPResponse is available in the connection state (https://golang.org/src/crypto/tls/common.go?#L269) so it should be possible to parse that into metrics.

I don't have any prior knowledge of OCSP so I'll need to play around with it a bit.

tykling commented 4 years ago

Fantastic. I've dipped my toes a few times (and I recently implemented an OCSP client in my ACME/LetsEncrypt thing Certgrinder), so let me know if there is anything I can do :+1:

ribbybibby commented 4 years ago

https://github.com/ribbybibby/ssl_exporter/pull/54

ribbybibby commented 3 years ago

Released in v2.2.0.