Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upNeed a way to treat `params` as a list for scrape definitions #4885
Comments
simonpasquier
added
the
component/service discovery
label
Nov 21, 2018
This comment has been minimized.
This comment has been minimized.
|
With blackbox_exporter, the service discovery usually discover the endpoints to probe and the address of the exporter is set via relabeling so I don't see the need for this use case. See https://github.com/prometheus/blackbox_exporter#prometheus-configuration. I'm not sure about what is missing for cloudwatch_exoprter either. |
simonpasquier
added
kind/question
kind/more-info-needed
labels
Nov 21, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hehnope commentedNov 20, 2018
•
edited
Proposal
The primary use case is when combining
blackbox_exporteranddns_sd_config; the__address__.Another use case is if you're working with
cloudwatch_exporterand specifying theregionvia HTTP param. If you have presence in more than one region, then you need a scrape definition for each region; instead, it's just "nicer" to create a list of httpparamsthat are scraped and treated as a single scrape definition based on theparams.Example
I initially tried to use:
So, the idea is that:
dns_sd_configsis used to get the actual endpoint forblackbox_exporter.targetto specify the host; then the idea is to just send that as an HTTP param.I tried to combine both
dns_sd_configsandstatic_configsbut from what I can tell they both use__address__and sodns_sd_configwill end up getting overwritten and vice-versa. So, the idea is that instead to allow a way to "iterate" a param inparamsinstead of combing both. Please note, I tried this and it does not work.For example, if you use the following static config:
Setup a nc:
nc -nl 33235and wait for prometheus to scrape you'll see:It would be nice to instead have prometheus iterate through the array and treat each one as a single request. Of course, I imagine changing the current functionality may cause breakage; so an alternative would also be ideal.