💡 For use cases that don't require clustering, check out the single-node playground.
| Machine | Component | Port | Purpose |
|---|---|---|---|
| gateway | vminsert | 8480 | Accepts incoming metrics and distributes them across storage nodes |
| gateway | vmselect | 8481 | Queries data from storage nodes and merges results |
| gateway | vmagent | 8429 | Scrapes metrics from cluster components and writes to vminsert |
| storage-01, storage-02 | vmstorage | 8482 | Stores time-series data on disk |
VictoriaMetrics cluster components
curl: Used to interact with the VictoriaMetrics HTTP API directlyFrom 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
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
Open the vmui tab to access VictoriaMetrics' built-in query interface. It supports MetricsQL with autocompletion, query tracing, and a variety of visualization options.
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
💡 You can check the scrape config in the playground at /etc/vmagent/scrape.yaml.
Happy learning! 🚀
💡 For use cases that don't require clustering, check out the single-node playground.
| Machine | Component | Port | Purpose |
|---|---|---|---|
| gateway | vminsert | 8480 | Accepts incoming metrics and distributes them across storage nodes |
| gateway | vmselect | 8481 | Queries data from storage nodes and merges results |
| gateway | vmagent | 8429 | Scrapes metrics from cluster components and writes to vminsert |
| storage-01, storage-02 | vmstorage | 8482 | Stores time-series data on disk |
VictoriaMetrics cluster components
curl: Used to interact with the VictoriaMetrics HTTP API directlyFrom 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
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
Open the vmui tab to access VictoriaMetrics' built-in query interface. It supports MetricsQL with autocompletion, query tracing, and a variety of visualization options.
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
💡 You can check the scrape config in the playground at /etc/vmagent/scrape.yaml.
Happy learning! 🚀