-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Prometheus API & Prometheus Node Exporter Interrogator #18290
Conversation
If you find any other pieces of information that are valuable anywhere, let me know, easy to add things in, I've only tackled the ones I found. |
|
||
yamlconf['scrape_configs']&.each do |scrape| | ||
# check for targets which have creds built in to the URL | ||
if scrape['static_configs'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like being "that guy," but this is a 450-line conditional statement. Is there any chance we might rework it to dispatch to methods rather than contain everything into one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you aren't wrong. when I wrote it to exploit a customer they only had a few fields so it was simple. then when I got into the example config from prometheus, it kinda got out of hand. I'll see what I can do about re-writing it
I went through testing the Prometheus API, but when I went to test the node, the docs look incomplete. |
you are 100% correct, lemme get that fixed real quick |
fixed up. |
Prometheus Node
Prometheus API
|
Release NotesThis PR creates 2 modules: one to interrogate Prometheus API endpoints for information, the other to query Prometheus Node Exporters for information. This is supported by a new Prometheus library and specs. |
This PR creates 2 modules, a library and spec to handle various Prometheus things based on https://jfrog.com/blog/dont-let-prometheus-steal-your-fire/ .
I based the library for Prometheus on the example in their docs, however this product looks almost infinitely configurable. I've covered as many cases as I found in the test case AND on the Internet that were accessible. However I'm sure I've missed some.
Verification