jetstack / kube-lego

DEPRECATED: Automatically request certificates for Kubernetes Ingress resources from Let's Encrypt
Apache License 2.0
2.16k stars 267 forks source link

Prometheus Metrics #231

Closed arbarlow closed 4 years ago

arbarlow commented 7 years ago

Basic Prometheus metrics integration with the following metrics:

cert_reqs_total: Total number of request to ACME cert_errors_total: Total number of errors whilst requesting certs or keys from ACME cert_days_until_expiry: The number of days left per certificate

I've added a standard handler at /metrics also.

Note the tests pass but I'm unable to vendor the prometheus client dependency because I believe you're on an older version of dep? So I you might need to vendor before cutting your next release.

Happy to change the metric names, location or code etc!

stibi commented 6 years ago

Hello, how can I help to get this PR merged?

simonswine commented 6 years ago

@arbarlow Thanks for your contribution. It needs a few little nits but will help users of kube-lego.

@stibi feel free to look at these things as well

Ping me if I seem unresponsive :laughing:

arbarlow commented 6 years ago

Hey! OK, I'll take a look and come back soon!

arbarlow commented 6 years ago

@simonswine I've rebased so the current version should have no conflicts, the tests seem to fail on Travis but run locally, I would trigger a rebuild but don't have permissions

simonswine commented 6 years ago

Closing and reopening the pull request regularly triggers a new build

arbarlow commented 6 years ago

@simonswine ok, I think that's all right now?

arbarlow commented 6 years ago

@simonswine no problem, I'll sort these out and get back to you

simonswine commented 6 years ago

@arbarlow this PR against cert-manager has similar functionality: https://github.com/jetstack/cert-manager/pull/225