-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Multiple prometheus_scrape endpoints not scraped in parallel #17659
Comments
Just came across this issue trying to configure about 1500 nodes for prometheus_scrape—completely unusable in its current state. I'm happy to pick up the work started in #17660. Seems like there are just a couple of tasks to do?
noticed there are a couple more issues related to this:
long-lived tasks might be a larger refactor as you'd need to clean them up if the config changes and removes an endpoint.
"should" but letting tokio do its thing like @jszwedko mentioned seems more pragmatic. I'm happy to submit a new PR. |
Thanks for picking this up! |
…timeouts (#18021) <!-- **Your PR title must conform to the conventional commit spec!** <type>(<scope>)!: <description> * `type` = chore, enhancement, feat, fix, docs * `!` = OPTIONAL: signals a breaking change * `scope` = Optional when `type` is "chore" or "docs", available scopes https://github.com/vectordotdev/vector/blob/master/.github/semantic.yml#L20 * `description` = short description of the change Examples: * enhancement(file source): Add `sort` option to sort discovered files * feat(new source): Initial `statsd` source * fix(file source): Fix a bug discovering new files * chore(external docs): Clarify `batch_size` option --> fixes #14087 fixes #14132 fixes #17659 - [x] make target timeout configurable this builds on what @wjordan did in #17660 ### what's changed - prometheus scrapes happen concurrently - requests to targets can timeout - the timeout can be configured (user facing change) - small change in how the http was instantiated --------- Co-authored-by: Doug Smith <[email protected]> Co-authored-by: Stephen Wakely <[email protected]>
A note for the community
Problem
I am using Vector to scrape metrics from a large number (thousands) of instances using the
prometheus_scrape
source component.I expected the URLs set in the
endpoints
config to be scraped in parallel, but it appears to be scraping sequentially. This is not very useful since a single slow or broken endpoint prevents all other endpoints from being scraped properly. Other Prometheus agents scrape the provided endpoints in parallel.A workaround is to create a separate
prometheus_scrape
component for each endpoint, but creating a large number (thousands) of components creates heavy CPU load and seems to go against Vector's design.Configuration
Here's a minimal configuration that reproduces the issue:
Version
vector 0.30.0 (x86_64-unknown-linux-gnu 38c3f0b 2023-05-22 17:38:48.655488673)
Debug Output
No response
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: