mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +01:00
app/vmselect: show useful endpoints when requested /select/<accountID>/
page
This commit is contained in:
parent
18d7adf731
commit
3788d4f4eb
@ -239,6 +239,19 @@ func selectHandler(startTime time.Time, w http.ResponseWriter, r *http.Request,
|
||||
httpRequests.Get(at).Inc()
|
||||
httpRequestsDuration.Get(at).Add(int(time.Since(startTime).Milliseconds()))
|
||||
}()
|
||||
if p.Suffix == "" {
|
||||
if r.Method != "GET" {
|
||||
return false
|
||||
}
|
||||
fmt.Fprintf(w, "<h2>VictoriaMetrics cluster - vmselect</h2></br>")
|
||||
fmt.Fprintf(w, "See <a href='https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format'>docs</a></br>")
|
||||
fmt.Fprintf(w, "Useful endpoints:</br>")
|
||||
fmt.Fprintf(w, `<a href="vmui">Web UI</a><br>`)
|
||||
fmt.Fprintf(w, `<a href="prometheus/api/v1/status/tsdb">tsdb status page</a><br>`)
|
||||
fmt.Fprintf(w, `<a href="prometheus/api/v1/status/top_queries">top queries</a><br>`)
|
||||
fmt.Fprintf(w, `<a href="prometheus/api/v1/status/active_queries">active queries</a><br>`)
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(p.Suffix, "vmui") {
|
||||
// vmui access.
|
||||
prefix := strings.Join([]string{"", p.Prefix, p.AuthToken}, "/")
|
||||
|
Loading…
Reference in New Issue
Block a user