VictoriaMetrics Cluster Playground
Vendor

A multi-node VictoriaMetrics cluster with vminsert, vmselect, and vmstorage components.

VictoriaMetrics Cluster playground: A multi-node VictoriaMetrics cluster with vminsert, vmselect, and vmstorage components.
Machines & network
4 VMs ยท 8 vCPU ยท 11GiB RAM
Playground host Internet NAT MASQUERADE local (bridge) 172.16.0.0/24 gw 172.16.0.1/24eth0eth0eth0eth0
VM
vCPU ยท
eth0
/
ubuntu-24-04
VM
vCPU ยท
eth0
/
oci://ghcr.io/sagikazarmark/iximiuz-labs/playgrounds/victoriametrics-cluster/gateway:07f419d1f792
VM
vCPU ยท
eth0
/
oci://ghcr.io/sagikazarmark/iximiuz-labs/playgrounds/victoriametrics-cluster/storage:1e869def4018
VM
vCPU ยท
eth0
/
oci://ghcr.io/sagikazarmark/iximiuz-labs/playgrounds/victoriametrics-cluster/storage:1e869def4018
About
Note

๐Ÿ’ก For use cases that don't require clustering, check out the single-node playground.

๐Ÿ”ง System Components

MachineComponentPortPurpose
gatewayvminsert8480Accepts incoming metrics and distributes them across storage nodes
gatewayvmselect8481Queries data from storage nodes and merges results
gatewayvmagent8429Scrapes metrics from cluster components and writes to vminsert
storage-01, storage-02vmstorage8482Stores time-series data on disk
VictoriaMetrics cluster components

VictoriaMetrics cluster components

๐Ÿ› ๏ธ Tools

  • curl: Used to interact with the VictoriaMetrics HTTP API directly

๐ŸŽฏ Getting Started

Writing Metrics

From the dev-machine terminal:

Write a metric through vminsert:

curl -d 'my_custom_metric{env="playground"} 42' \
  http://gateway:8480/insert/0/prometheus/api/v1/import/prometheus

Querying Metrics

Query through vmselect:

curl -s 'http://gateway:8481/select/0/prometheus/api/v1/query?query=up' | jq

Query the custom metric written above:

curl -s 'http://gateway:8481/select/0/prometheus/api/v1/query?query=my_custom_metric' | jq

Querying with vmui

Open the vmui tab to access VictoriaMetrics' built-in query interface. It supports MetricsQL with autocompletion, query tracing, and a variety of visualization options.

Checking Cluster Health

Check vmstorage status on storage nodes (from dev-machine):

curl -s http://storage-01:8482/metrics | grep vm_rows
curl -s http://storage-02:8482/metrics | grep vm_rows

Check vmagent scrape targets:

curl -s http://gateway:8429/targets
Note

๐Ÿ’ก You can check the scrape config in the playground at /etc/vmagent/scrape.yaml.

๐Ÿ“š Learn More

๐Ÿงช Playgrounds

Happy learning! ๐Ÿš€

Every playground includes
Learn more about playgrounds
Start
Settings