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

Missing a data point as adjusting query step #4995

Closed
yhkim713 opened this issue Dec 13, 2018 · 3 comments
Closed

Missing a data point as adjusting query step #4995

yhkim713 opened this issue Dec 13, 2018 · 3 comments

Comments

@yhkim713
Copy link

Bug Report

What did you do?
Adjusting step param(required from query_range API) to make my graph more pretty but some points are missing unexpectedly.
A data scrape interval is 10sec

a first query is

increase(exception[1m] with a step 59s
--- it's json output is 
values:Array[7]
0:Array[1544668439,0]
1:Array[1544668498,0]
2:Array[1544668557,1.2]
3:Array[1544668616,0]
4:Array[1544668675,0]
5:Array[1544668734,0]
6:Array[1544668793,0]

and second query is

increase(exception[1m]) with a step 60s
--- it's json output is
values:Array[6]
0:Array[1544668440,0]
1:Array[1544668500,0]
2:Array[1544668560,0] // here, I expected that it should have a value
3:Array[1544668620,0]
4:Array[1544668680,0]
5:Array[1544668740,0]

Environment

  • Prometheus version:
    prometheus, version 2.1.0 (branch: HEAD, revision: 85f23d8)
    build user: root@6e784304d3ff
    build date: 20180119-12:01:23
    go version: go1.9.2
@simonpasquier
Copy link
Member

As stated in the documentation, Prometheus doesn't aim for 100% accuracy. This is why rate()/increase(), especially applied to slowly increasing counters, don't always yield the same results depending on the step interval. See #3746 for a (much) longer discussion and the current take from the Prometheus team.

I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search.

@yhkim713
Copy link
Author

thank you for your detailed answer and the link

@brian-brazil
Copy link
Contributor

The issue here is more that your step and range are about the same, you want a range that's larger than your step to avoid things like this.

@lock lock bot locked and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants