-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding prometheus output #256
Conversation
@sstarcher The solution here is really a wrapper around awslimitchecker, not integrating Prometheus. For the purpose of #152, the solution needs work within the awslimitchecker public API, i.e. it needs to be instantiated inside the AwsLimitChecker class. I'd be happy to merge this as an example script in the Keep in mind that AwsLimitChecker is only capable of checking one region at a time. Looking at the example code here, if we could simply run prometheus during each individual run (one region), I do feel that this could fit within the current AwsLimitChecker paradigm. We'd simply need to instantiate the metrics service class before doing anything else (this would start the prometheus server, and do whatever other setup is needed) and then have the metrics service class expose methods like If we're adding metrics support to awslimitchecker, at a minimum, I'd like it to be something that will work with statsd and DataDog. I think that a generic solution with a class that's instantiated before any usage/limits are checked, and then has methods that are called at various points in the process, should suffice for most use cases that I'm aware of. |
Yep just giving an example. I don't have time to dig into the code and determine the best way to implement it inside of awslimitchecker. |
adding config, moved to examples, linted |
Codecov Report
@@ Coverage Diff @@
## develop #256 +/- ##
======================================
Coverage 100% 100%
======================================
Files 23 22 -1
Lines 1696 1648 -48
Branches 262 254 -8
======================================
- Hits 1696 1648 -48
Continue to review full report at Codecov.
|
Updated with develop branch; merging now. Thank you for the contribution! |
This was just released in 0.8.0, which is now live on PyPI. Apologies for the long delay before this release. |
This is an example for integrating with prometheus. Prometheus unlike statsd and others keeps state and integrates better when the objects are group smartly.