joe-elliott / cert-exporter

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

Support exporting metrics to CloudWatch #47

Closed greg-gajda closed 4 years ago

greg-gajda commented 4 years ago

Hi everyone, I've just created this PR to add support for sending cert expiry metrics data not only to Prometheus but to CloudWatch alongside. This feature is quite useful in context of the project I'm currently working on in HMRC. The behaviour of the app won't change unless flag enable-cloudwatch-in-region is used. If by any reason you don't like this extension, please do not hesitate to reject and close this PR, but if you accept it and have any implementation suggestions I'm happy to keep contributing.

joe-elliott commented 4 years ago

Thanks for this contribution. I'm not opposed to it generally.

I would like to point out this exists (and probably others like it) https://github.com/cloudposse/prometheus-to-cloudwatch and might meet your needs more generically. If your PR solves a specific problem that can't be solved with a utility like this I'd be glad to merge.

Also, since I'll probably won't use this, is it possible to add a super basic integration test? Perhaps with something like: https://github.com/localstack/localstack so I can make sure I don't break it in the future?

Thank you for taking the time to contribute! If we work through this I will merge.

greg-gajda commented 4 years ago

Hi, as you suggests adding prometheus-to-cloudwatch to the stack may work in a very similar way, I'll have to take a look. By any chance I didn't want to create something against your idea of where to direct this product.

joe-elliott commented 4 years ago

To be clear I am happy to consider/merge this if it you cannot accomplish your goals otherwise. Even if you go a different direction I appreciate the contribution :)

greg-gajda commented 4 years ago

That's fine, this PR wasn't probably the best fitted to this project