-
Notifications
You must be signed in to change notification settings - Fork 99
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
POST /api/v1/series: Incorrect match[] param set in the URL query #134
Comments
encountering the same issue and unable to use prom label proxy due to the incorrect results in query variable and huge performance impact (10-15 seconds for 2 query variable) for showing the query variable in grafana as the results are INACCURATE with huge number of incorrect metric results. |
does anyone know any workaround resolve this? I'm relying on prom-label-proxy to control access per tenant, but due to performance issue, it affects my implementation as well. It would be much appreciated if anyone have a quick fix |
If you are using Grafana, a working workaround is to configure the "HTTP method" field of the datasource to GET instead of POST. I tested this workaround successfully with prom-label-proxy v0.6.0 + Grafana 9.1.8 |
Same here. The /api/v1/series endpoint via proxy will return 500 after sending a POST method. Grafana 9.5.5 |
While reading the README I came across this endpoint support GET method: Line 51 in c1160c9
however from the code it seems that it should support GET and POST methods prom-label-proxy/injectproxy/routes.go Line 291 in c1160c9
Does it relate to this PR? #111 |
Summary
I was testing the prom-label-proxy v0.6.0 + Grafana 9.1.8 and I noticed that when using HTTP POST method with the
/api/v1/series
endpoint, prom-label-proxy is passing two different value for thematch[]
parameter: one in the POST body and the other one in the URL query parameters.This leads to incorrect results. For instance the thanos querier seems to read only the
match[]
value in the query parameter in this situation which is pretty much garbage.For instance if we are doing:
Then the resulting HTTP query sent by prom-label-proxy is (in JSON format as recorded by gohrec and URL-decoded) will be:
Depending on its implementation, the upstream may only read the
match[]
value set in the URI (which is the case for the Thanos querier). Even if it is true that the upstream should only read thematch[]
value in the request body withContent-Type: application/x-www-form-urlencoded
, this is still an issue in the way prom-label-proxy is writing the resulting query.Full response recorded by gohrec
Steps to reproduce
./logs/[date]/
Expected behavior
The HTTP request sent to the upstream should be:
instead of
The text was updated successfully, but these errors were encountered: