Skip to content
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

Add a scrape timeout parameter in docker compose #435

Open
demeringo opened this issue Feb 8, 2024 · 5 comments
Open

Add a scrape timeout parameter in docker compose #435

demeringo opened this issue Feb 8, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation draft feature draft feature enhancement New feature or request

Comments

@demeringo
Copy link
Collaborator

Problem

Producing metrics for a large number of instances takes too long (something like 25 seconds for 100+ instances).
As a result promethues times out before cloud scanner returns metrics and we see no data in the dashboard (nor in prometheus).

Solution

As a short terme workaround we can increase the scrape_timeout in prometheus config. The default is 10 second, we could include an example of setting the timeout to 60 seconds.

Also needs to be mentionned in the docs.

Long term solution is to optimize the way we gather data and return metrics but this is another story #392

Alternatives

Additional context or elements

This condition can be detected in the prometheus UI, by checking the status / targets page which returns details about scrape time for different targets.

@demeringo demeringo added documentation Improvements or additions to documentation enhancement New feature or request draft feature draft feature labels Feb 8, 2024
@demeringo
Copy link
Collaborator Author

In term of documentation I believe we should do 2 things:

  • add a chapter about this in the 'how-to' section
  • mention this potential issue in the 'common-issues' and link to above page

@demeringo
Copy link
Collaborator Author

Note: this setting is also briefly mentionned in https://boavizta.github.io/cloud-scanner/how-to/set-up-dashboard.html#adapting-configuration-for-production-use, we may have to link to the newly created page and remove the details from this paragraph.

@demeringo
Copy link
Collaborator Author

The example scrape interval is already mentioned in the sample prometheus config file.

scrape_interval: 30s # By default, scrape targets every 30 seconds.

So this issue is more a documentaion issue (but we could be more explicit in the comment of the prometheus config file)

@demeringo
Copy link
Collaborator Author

To help debug the possible timeout when scrapping metrics (in docker compose example), you can check the status for individual scraping targets here:

http://localhost:9090/targets?search=

The global prometheus UI is at: http://localhost:9090/

jnioche added a commit that referenced this issue Dec 9, 2024
@jnioche
Copy link
Collaborator

jnioche commented Dec 9, 2024

See 8d4ab37 which explicits the config in Prometheus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation draft feature draft feature enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants