-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
store: Querying with regex label matchers return invalid metrics in version 0.3.0 #833
Comments
In mean time try deploying thanos-store in 0.2.1. |
Thanos store 0.2.1 seems to be working fine for now, enjoy your holidays! |
We fixed the matchers here: #839 Also we added extended test cases, but I don't think we can repro your case. Can you try master image for thanos-store? |
Looks like the second scenario from the issue has been fixed! Unfortunately the first has not. If it'd help I can provide access to the GCS bucket? DM: @BenClapp |
I think just more info in what is wrong is fine for now. So this doesn't not work?
What Prometheus itself is doing? It is doing as you expect? And what you expect? Because for "invalid label" ~= the flow is that it gives all, because we filtered out what we could - nothing because label does not exist. (: |
Sure :) So with the build from master, this is what I see.
In both cases Prometheus returns no results, as I would expect. I may be mistaken, but shouldn't the logic be to use the label selectors to select series, rather than to filter away series which don't match? |
To update on this scenario from the original post
Blocks that have a successful regex match return results as I would expect, that is only series for |
Confirming the issue.
to the same thanos-query and get 174 results. |
Ok I think this is a key issue here (: let me again double check between our and tsdb matching in this detail. |
Fixes #833 Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Found & fixed: #862 PTAL and thanks all for details input on what's broken (: Silly bug in edge case ): I wish there were more unit tests for TSDB we could get test cases from. Now our test cases are much more extended then for TSDB itself - hopefully it covers now all we need. |
Fixes #833 Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Thank you, confirming the fix in |
Thanos, Prometheus and Golang version used
What happened
After upgrading all components from 0.2.1 to 0.3.0, some dashboards using queries with regex label matchers started showing incorrect metrics. Querying thanos store v0.2.1 from thanos query v0.3.0 works as expected. Toggling deduplication, partial response, and all downsampling options return the same incorrect results. Some query examples:
container_memory_usage_bytes{name=~"thanos-compact}
returns metrics for all containers, whereascontainer_memory_usage_bytes{name="thanos-compact}
returns metrics for only thanos-compact. In this case, the invalid results are only for a 6h window, all results outside of this window are correct. The blocks in this 6h window were uploaded with thanos 0.2.1 components.up{job=~"thanos"}
returns thanos metrics correctly, howeverup{invalidLabelName=~"thanos"}
behaves as if the query was for onlyup
. In this case, the query returns incorrect results for all time.What you expected to happen
Queries return metrics that correctly match the regex in the query, just as prometheus and thanos-store v0.2.1 do.
How to reproduce it (as minimally and precisely as possible):
Should be covered by the description above, but happy to provide any information required.
Full logs to relevant components
thanos-store
thanos-query
Anything else we need to know
The text was updated successfully, but these errors were encountered: