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

Incorrect data saved to prometheus #37

Closed
Kostoni opened this issue Aug 31, 2022 · 2 comments
Closed

Incorrect data saved to prometheus #37

Kostoni opened this issue Aug 31, 2022 · 2 comments

Comments

@Kostoni
Copy link

Kostoni commented Aug 31, 2022

Hi

I have a problem with prometheus. When I run script with saving metrics to prometheus I see aproximately 5 min of fake data at the end of test run metrics.

It repeats on your sample from readme file. If you go to prometheus after test.js script execution you'll see that you have 5 minutes of data after the data for 10 seconds your test script saved.

2022-08-31_16-56-33

You can see this fake data also using grafana dashboard from your example.

2022-08-31_17-02-33

Repeated in 0.38, 0.39 version of k6

Thank you for your job!

@Kostoni
Copy link
Author

Kostoni commented Aug 31, 2022

Hi again, we've found that reason was in flag query.lookback-delta with default value 5m. I think need to add this prometheus behavior to readme file and fix docker-compose file to create prometheus image with correct behavior.

This fix should be enough to correct work.

command: --web.enable-remote-write-receiver --query.lookback-delta=1s --config.file=/etc/prometheus/prometheus.yml

Thanks!

@codebien
Copy link
Contributor

codebien commented Nov 29, 2022

Note: this should be automatically fixed when #68 is added.

@codebien codebien mentioned this issue Nov 30, 2022
@codebien codebien closed this as completed Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants