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

vmui: Use POST instead of GET, to support long queries #6288

Open
nick-kentik opened this issue May 16, 2024 · 0 comments
Open

vmui: Use POST instead of GET, to support long queries #6288

nick-kentik opened this issue May 16, 2024 · 0 comments
Labels
enhancement New feature or request vmui

Comments

@nick-kentik
Copy link

nick-kentik commented May 16, 2024

Is your feature request related to a problem? Please describe

We run a VictoriaMetrics cluster behind a haproxy load-balancer. I like using VMUI (also behind that load-balancer), but it fails to execute long queries due to restrictions the load balancer places on the request URI, including the query string.

VMUI sends a GET request with a request URI like .../select/0/prometheus/api/v1/query_range?query=..., which for some queries can get to 12KiB or so. At that size, haproxy returns a text/html 400 bad request and vmselect never sees the request.

Describe the solution you'd like

VictoriaMetrics supports both POST and GET to its query API for precisely this reason - the maximum length of a URI is not well defined, and it's easy to trip well-meaning limits imposed by intermediaries. I'd like VMUI to switch from making GET requests to POST requests so it works seamlessly in such an environment.

Grafana also offers the option of POST vs GET in its Prometheus datasource configuration - and defaults to POST, reserving GET for older versions of Prometheus that don't support it.

Describe alternatives you've considered

We could modify our load-balancer so it supports very long request URIs, but that would only help us, rather than everyone.

Additional information

Just a screenshot of a GET request made by VMUI:

Screenshot from 2024-05-16 11-24-24

@nick-kentik nick-kentik added the enhancement New feature or request label May 16, 2024
@Amper Amper added the vmui label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vmui
Projects
None yet
Development

No branches or pull requests

2 participants