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

Same url (with max time in future) got diffenent data from Prometheus and thanos query #3001

Closed
husoule opened this issue Aug 7, 2020 · 6 comments · Fixed by #3010
Closed

Comments

@husoule
Copy link

husoule commented Aug 7, 2020

What happened:
I want a query which endtime is a future time. If I play with Prometheus directly, I see the latest result being less then now + lookback-delta. This is as expected。 But via thanos query, it got the latest result data of future 5m.

via thanos query:
image

Prometheus directly:
image

What you expected to happen:
get the same data

Anything else we need to know:

Environment:

  • OS (e.g. from /etc/os-release): centos7

  • Kernel (e.g. uname -a): Linux VM_120_12_centos 3.10.107-1

  • Others:
    prometheus version: v2.18.1
    thanos query version: thanos:v0.12.0
    thanos query args:

      - query
      - --log.level=debug
      - --query.auto-downsampling
      - --grpc-address=0.0.0.0:10901
      - --http-address=0.0.0.0:9090
      - --query.partial-response
      - --query.replica-label=prometheus_replica
      - --query.replica-label=rule_replica
    
@bwplotka
Copy link
Member

bwplotka commented Aug 11, 2020

Ack, might be the deduplication (: But well if ask for future - this is what deduplication interpolates ;p

@bwplotka bwplotka added the bug label Aug 11, 2020
@bwplotka
Copy link
Member

How critical this is? Why it would cause issues?

@bwplotka bwplotka changed the title same url got diffenent data from Prometheus and thanos query Same url (with max time in future) got diffenent data from Prometheus and thanos query Aug 11, 2020
@husoule
Copy link
Author

husoule commented Aug 17, 2020

How critical this is? Why it would cause issues?

I have a stress test service platform for many users . Use prometheus+thanos+grafana to collect and display graphs of stress test data. The stress test data is more accurate in terms of time, but the user actually saw the data in the chart that has not yet occurred, which is unacceptable. So I adjusted prometheus' --query.lookback-delta=5s to reduce future data. And prometheus is as expected, but there will still be data for the next 5m after thanos. So in fact, in my scenario, future data is not needed. I don't know how to not get the data of future time via thanos query.

@krasi-georgiev
Copy link
Contributor

krasi-georgiev commented Aug 21, 2020

Thanos uses the same promql engine so @husoule have you tried to adjust the look-back in the Thanos code as well? If that works you can open a PR to make this configurable the same way as in Prometheus. Of course, if the Thanos maintainers would accept such a change.

btw in the original comment, you should also mention that the look-back in Prometheus is set to 5s instead of the 5m default. I was looking at the images and was quite confused before I realise that the Prometheus server was started with a 5s look-back.

@stale
Copy link

stale bot commented Oct 20, 2020

Hello 👋 Looks like there was no activity on this issue for the last two months.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity in the next two weeks, this issue will be closed (we can always reopen an issue if we need!). Alternatively, use remind command if you wish to be reminded at some point in future.

@stale stale bot added the stale label Oct 20, 2020
@stale
Copy link

stale bot commented Nov 3, 2020

Closing for now as promised, let us know if you need this to be reopened! 🤗

@stale stale bot closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants