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

/api/v1/series and /api/v1/labels use http GET method to downstream server may cause http 414 error #588

Closed
pyfdtic opened this issue Apr 11, 2023 · 2 comments · Fixed by #589

Comments

@pyfdtic
Copy link

pyfdtic commented Apr 11, 2023

we meet http 414 error in our enviroment, url is /api/v1/series,
our request link like grafana -> promxy -> vm, after dig a while we found promxy use http GET method to request downstream prometheus server, code in https://github.com/jacksontj/promxy/blob/master/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api.go#L1036 and https://github.com/jacksontj/promxy/blob/master/vendor/github.com/prometheus/client_golang/api/prometheus/v1/api.go#L1163 .

is there a design for this ? or it's a bug ?

@jacksontj
Copy link
Owner

This looks like a "missing feature" in the client_golang. I added the GET with POST fallback for query and query _range previously (jacksontj/client_golang@7d0e24e) but looking at the API docs it seems that some other APIs support POST as well -- so that would require similar updates to those methods.

jacksontj added a commit to jacksontj/client_golang that referenced this issue Apr 16, 2023
The upstream prometheus HTTP API supports POSTS for these methods (the
same as Query and QueryRange). Similar to the original issue
(prometheus#428) we can hit 414
errors with these other APIs. This change simply duplicates the logic to
these other endpoints

Related to: jacksontj/promxy#588

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>
@jacksontj
Copy link
Owner

PR created upstream: prometheus/client_golang#1252

bwplotka pushed a commit to prometheus/client_golang that referenced this issue Apr 16, 2023
…lback (#1252)

The upstream prometheus HTTP API supports POSTS for these methods (the
same as Query and QueryRange). Similar to the original issue
(#428) we can hit 414
errors with these other APIs. This change simply duplicates the logic to
these other endpoints

Related to: jacksontj/promxy#588

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>
jacksontj added a commit that referenced this issue Apr 16, 2023
jacksontj added a commit that referenced this issue Apr 16, 2023
jacksontj added a commit that referenced this issue Apr 16, 2023
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.

2 participants