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

query: support POST method for query/query_range endpoints #939

Merged

Conversation

eahydra
Copy link
Contributor

@eahydra eahydra commented Mar 19, 2019

Signed-off-by: Joseph Lee joseph.t.lee@outlook.com

Changes

The Prometheus support POST method for query/query_range endpoints, and Grafana support POST method for Prometheus too.

When do complex query with multi label values from Grafana used GET method such as count(node_load{instance=~"11\\.11\\.11\\.11|\\8\\.8\\.8\\.8"}) that label instance have much more IP will failed, but if support POST method in Thanos Query, the query will work.

Verification

I have test it in my daily environment and production environment.

Signed-off-by: Joseph Lee <joseph.t.lee@outlook.com>
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution! Now Thanos Query is closer to having the same Prometheus API as outlined here: https://github.com/prometheus/prometheus/blob/5603b857a9182ea3129dce023b4ee5eed31a5f4e/web/api/v1/api.go#L224.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks.

@GiedriusS GiedriusS merged commit 44272a6 into thanos-io:master Mar 20, 2019
@eahydra eahydra deleted the support_post_for_query_endpoints branch March 21, 2019 09:27
@eahydra eahydra restored the support_post_for_query_endpoints branch March 21, 2019 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants