joe-elliott / cert-exporter

A Prometheus exporter that publishes cert expirations on disk and in Kubernetes secrets
Apache License 2.0
313 stars 88 forks source link

Support for the metrics with NotBefore timestamp #133

Open Woytek-Polnik opened 1 year ago

Woytek-Polnik commented 1 year ago

Could it be possible to add support to extra metrics which would say since when certficiate can be used It should be fairly simple .NotBefore from https://pkg.go.dev/crypto/x509#pkg-variables

I've never touched go - and it would be super cool to have such metrics.

It would literally allow to compare NotBefore from k8s secret with the time when pod was started. And automatically restart pods when they were spawned before this cert (so cert was renewed)

joe-elliott commented 1 year ago

I would definitely merge this if someone has time to work on it.