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

Thanos query param dedup does not take effect after add externalLabels for prometheus and thanos-ruler? #7033

Closed
magiceses opened this issue Jan 5, 2024 · 11 comments

Comments

@magiceses
Copy link
Contributor

Thanos, Prometheus and Golang version used: thanos v0.31.0

What happened:
After add external label to thanos ruler, when i query metric through thanos-query
image
image

the param is not taking effect? and the metrics on the second and third lines are exactly the same, just like:
image
image

and when i change the label to {host_ip="10.20.0.7"}, the metric become to one metric? why?
image

How to reproduce it (as minimally and precisely as possible):
add the same external label to prometheus and thanos ruler

Anybody can help? This is a bug for thanos or i ignore some settings after add external labels?

@magiceses magiceses changed the title Thanos query param dedup does not take effect? Thanos query param dedup does not take effect after add externalLabels for prometheus and thanos-ruler? Jan 5, 2024
@MichaHoffmann
Copy link
Contributor

0.31 has had known dedup issues, can you try upgrading?

@magiceses
Copy link
Contributor Author

magiceses commented Jan 5, 2024

ok, i can try it , can i ask which issue or which patch is already repair it? @MichaHoffmann

@MichaHoffmann
Copy link
Contributor

There were a couple, the root cause was in the end that the store apis could under some circumstances involving external labels return unsorted responses but dedup replies on them being sorted

@magiceses
Copy link
Contributor Author

magiceses commented Jan 5, 2024

what mean the store apis? I do not use thanos store gateway, i just use the sidecar/query/ruler;
you mean thanos-ruler?

@MichaHoffmann
Copy link
Contributor

Ah, I mean the gRPC store api; all of them implement it on one way or another!

@magiceses
Copy link
Contributor Author

Got it , thanks very much.
By the way, does the 0.31.0 version bug you mentioned above refer to this link(#6257 (comment)) can explain the problem?

@MichaHoffmann
Copy link
Contributor

Got it , thanks very much. By the way, does the 0.31.0 version bug you mentioned above refer to this link(#6257 (comment)) can explain the problem?

Yes precisely that!

@magiceses
Copy link
Contributor Author

execuse me, when i upgrade thanos-ruler from 0.31.0 to 0.32.0/0.33.0, the thanos ruler raise error:
image

Thanos-ruler cannot be upgraded directly from 0.31.0 to higher version? what else do i need to do? @MichaHoffmann

@MichaHoffmann
Copy link
Contributor

I think that is a case of https://github.com/thanos-io/thanos/pull/6107 and might need some solution like https://github.com/utilitywarehouse/thanos-manifests/pull/77/files maybe!

@magiceses
Copy link
Contributor Author

it works! Thank you very much!!

@MichaHoffmann
Copy link
Contributor

You're welcome!

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