diff --git a/README.md b/README.md index fa4a0cece1..660d9c13f1 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,7 @@ It is recommended setting up alerts in [vmalert](https://docs.victoriametrics.co - `tags/autoComplete/values` - returns tag values matching the given `valuePrefix` and/or `expr`. See [these docs](https://graphite.readthedocs.io/en/stable/tags.html#auto-complete-support). - `tags/delSeries` - deletes series matching the given `path`. See [these docs](https://graphite.readthedocs.io/en/stable/tags.html#removing-series-from-the-tagdb). -* URL with basic Web UI: `http://:8481/select//prometheus/vmui/`. +* URL with basic Web UI: `http://:8481/select//vmui/`. * URL for query stats across all tenants: `http://:8481/api/v1/status/top_queries`. It lists with the most frequently executed queries and queries taking the most duration. diff --git a/app/vmselect/README.md b/app/vmselect/README.md index 8fcd4c4cf7..cd9236fd38 100644 --- a/app/vmselect/README.md +++ b/app/vmselect/README.md @@ -5,4 +5,4 @@ - Merges responses from all the `vmstorage` nodes and returns a single response. -The `vmui` directory contains static contents built from [app/vmui](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmui) package with `make vmui-update` command. The `vmui` page is available at `http://:8481/select//prometheus/vmui/`. +The `vmui` directory contains static contents built from [app/vmui](https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmui) package with `make vmui-update` command. The `vmui` page is available at `http://:8481/select//vmui/`. diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 4505a99ed3..555e5a36d5 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -129,11 +129,6 @@ var ( }) ) -//go:embed vmui -var vmuiFiles embed.FS - -var vmuiFileServer = http.FileServer(http.FS(vmuiFiles)) - func requestHandler(w http.ResponseWriter, r *http.Request) bool { if r.URL.Path == "/" { if r.Method != "GET" { @@ -233,15 +228,20 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool { } } +//go:embed vmui +var vmuiFiles embed.FS + +var vmuiFileServer = http.FileServer(http.FS(vmuiFiles)) + func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request, p *httpserver.Path, at *auth.Token) bool { defer func() { // Count per-tenant cumulative durations and total requests httpRequests.Get(at).Inc() httpRequestsDuration.Get(at).Add(int(time.Since(startTime).Milliseconds())) }() - if strings.HasPrefix(p.Suffix, "prometheus/vmui") { + if strings.HasPrefix(p.Suffix, "vmui") { // vmui access. - prefix := strings.Join([]string{"", p.Prefix, p.AuthToken, "prometheus"}, "/") + prefix := strings.Join([]string{"", p.Prefix, p.AuthToken}, "/") http.StripPrefix(prefix, vmuiFileServer).ServeHTTP(w, r) return true } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 096f189c48..dd6e66fc2e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -12,7 +12,7 @@ sort: 15 * FEATURE: export `vmselect_request_duration_seconds` and `vminsert_request_duration_seconds` [VictoriaMetrics histograms](https://valyala.medium.com/improving-histogram-usability-for-prometheus-and-grafana-bc7e5df0e350) at `/metrics` page. These histograms can be used for determining latency distribution for the served requests. * FEATURE: vmselect: embed [vmui](https://github.com/VictoriaMetrics/vmui) into a single-node VictoriaMetrics and into `vmselect` component of cluster version. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1413). The web interface is available at the following paths: * `/vmui/` for a single-node VictoriaMetrics - * `/select//prometheus/vmui/` for `vmselect` at cluster version of VictoriaMetrics + * `/select//vmui/` for `vmselect` at cluster version of VictoriaMetrics * BUGFIX: vmagent: remove `{ %space %}` typo in `/targets` output. The typo has been introduced in v1.62.0. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1408). * BUGFIX: vmagent: fix CSS styles on `/targets` page. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1422). diff --git a/docs/Cluster-VictoriaMetrics.md b/docs/Cluster-VictoriaMetrics.md index 669e03c03d..a048d3e3c8 100644 --- a/docs/Cluster-VictoriaMetrics.md +++ b/docs/Cluster-VictoriaMetrics.md @@ -235,7 +235,7 @@ It is recommended setting up alerts in [vmalert](https://docs.victoriametrics.co - `tags/autoComplete/values` - returns tag values matching the given `valuePrefix` and/or `expr`. See [these docs](https://graphite.readthedocs.io/en/stable/tags.html#auto-complete-support). - `tags/delSeries` - deletes series matching the given `path`. See [these docs](https://graphite.readthedocs.io/en/stable/tags.html#removing-series-from-the-tagdb). -* URL with basic Web UI: `http://:8481/select//prometheus/vmui/`. +* URL with basic Web UI: `http://:8481/select//vmui/`. * URL for query stats across all tenants: `http://:8481/api/v1/status/top_queries`. It lists with the most frequently executed queries and queries taking the most duration.