Links#
https://docs.victoriametrics.com/victoriametrics/#vmui
https://docs.victoriametrics.com/victoriametrics/#top-queries
https://docs.victoriametrics.com/victoriametrics/#active-queries
https://docs.victoriametrics.com/victoriametrics/#cardinality-explorer1. Important Points#
VMUI 是 VictoriaMetrics 自带的 query troubleshooting / exploration UI。
use for:
ad-hoc MetricsQL query
verify data ingestion
inspect raw samples
find slow / active queries
explore metrics by job / instance
inspect high cardinality metrics and labels
do not use as:
full dashboard platform replacement
public internet endpoint
multi-team access control layerSecurity default:
production:
expose VMUI only through private network, VPN, vmauth, or authenticated reverse proxy
do not expose :8428 / :8481 directly to public internet
protect query endpoints and admin endpoints at the same boundary2. Access#
Single-node:
http://victoriametrics:8428/vmui/Local Docker:
docker run -d \
--name victoria-metrics \
-p 8428:8428 \
-v victoria-metrics-data:/victoria-metrics-data \
victoriametrics/victoria-metrics:latest \
-retentionPeriod=30d
open http://localhost:8428/vmui/Cluster:
http://<vmselect>:8481/select/<accountID>/vmui/
example:
http://vmselect:8481/select/0/vmui/Verify endpoint:
curl -I http://localhost:8428/vmui/
curl 'http://localhost:8428/api/v1/query?query=up'3. Query#
Query tab:
run MetricsQL / PromQL-compatible queries
view graph / table / histogram-style result
use autocomplete for functions, metric names, label names and label values
use Shift-Enter for multi-line query
Raw Query tab:
inspect raw samples
useful for checking scrape interval, duplicate samples, and unexpected query resultUseful first queries:
up
sum(rate(vm_http_requests_total[5m])) by (path)
sum(rate(http_requests_total[5m])) by (service, route, status)4. Troubleshooting Tabs#
| Tab | Use For | Backing API |
|---|---|---|
| Top queries | 找最频繁、最慢、总耗时最高、内存使用高的 query | /api/v1/status/top_queries |
| Active queries | 看当前正在执行的 query、耗时和 client address | /api/v1/status/active_queries |
| Metrics explorer | 按 job / instance 浏览 metric 并自动生成图 |
query API |
| Cardinality explorer | 找 series 数最多的 metric、label、label value | /api/v1/status/tsdb |
Top queries API example:
curl 'http://localhost:8428/api/v1/status/top_queries?topN=10&maxLifetime=30m'Active queries API example:
curl 'http://localhost:8428/api/v1/status/active_queries'Cardinality check:
curl 'http://localhost:8428/api/v1/status/tsdb'5. Common Cases#
no data in graph:
verify time range
run `up`
check remote_write / vmagent ingestion
check label filters are not too narrow
query slow:
open Top queries
reduce time range
reduce high-cardinality group by
consider recording rule through vmalert
too many series:
open Cardinality explorer
find top metric names and labels
remove user_id / request_id / full_url style labels at ingestion
unexpected samples:
use Raw Query
check scrape interval and duplicate samples6. Configuration#
useful flags:
-vmui.defaultTimezone
default timezone used in VMUI
-vmui.customDashboardsPath
path to custom VMUI dashboardsExample:
victoria-metrics \
-retentionPeriod=30d \
-vmui.defaultTimezone=Asia/Hong_Kong7. Production Checklist#
access:
VMUI is behind private network / VPN / vmauth / authenticated proxy
direct public access to :8428 or :8481 is blocked
query safety:
slow queries checked through Top queries
active queries checked during incidents
common heavy queries converted to recording rules
cardinality:
Cardinality explorer reviewed before adding new high-volume labels
high-cardinality labels blocked at scrape / relabeling layer
operation:
Grafana remains primary dashboard
VMUI is used for exploration and troubleshooting