RousselTMLEARNING

TP · VictoriaMetrics: from discovery to expertise

Lab: Single-node VictoriaMetrics with Prometheus and Grafana

What you will learn in this TP
  • Launch VictoriaMetrics
  • Configure remote write
  • Query from Grafana and vmui

Introduction #

What you will learn in this section
  • Launch VictoriaMetrics
  • Configure remote write
  • Query from Grafana and vmui

Context. Your Prometheus only keeps 15 days of data. You add VictoriaMetrics as long-term storage, without changing how metrics are collected.

Prerequisites: Docker Compose  ·  Estimated time: 35 min

Long-term storage in a few minutes.

Setup #

Guided steps, with their solutions.

  1. 1. Write the Compose file

    Why? Three services are enough: the database, Prometheus and Grafana, plus node-exporter so there is some data.

    Create the Compose file and the Prometheus configuration.
  2. 2. Start and check

    Why? VictoriaMetrics' internal metrics confirm that samples are arriving.

    Start the stack and check the insert counter.
  3. 3. Query with vmui

    Why? The built-in interface means you don't need to install anything for a first exploration.

    Open http://localhost:8428/vmui and plot CPU usage by mode.
  4. 4. Connect Grafana

    Why? As far as Grafana is concerned, VictoriaMetrics is a Prometheus data source.

    Add a Prometheus data source pointing to http://vm:8428 and import a Node Exporter dashboard (for example ID 1860).
  5. 5. Measure disk usage

    Why? Efficiency is the main selling point, so let's verify it.

    Compare the number of stored samples with the disk space used.

Difficulty level : ●●○○○ (2/5)

My progress

  • ⏱ Estimated time : ≈ 35 min

Sign in to track your progress and take notes. Sign in

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

VictoriaMetrics: why and how, from single node to cluster

What VictoriaMetrics brings compared with Prometheus alone, its components (single-node, vmagent,...

Ingesting metrics into VictoriaMetrics: scraping, vmagent and remote write

All the ways to feed VictoriaMetrics: remote write from Prometheus, built-in scraping, vmagent an...

Thanos, Grafana Mimir or VictoriaMetrics: which long-term storage for Prometheus?

Detailed comparison of three long-term storage solutions for Prometheus: architecture, storage, h...

Observing a k6 test: Prometheus, Grafana and correlation with the system under test

Send k6 results to Prometheus (remote write) or via OpenTelemetry, visualize them in Grafana and ...

Prometheus: visualizing your metrics (UI, Grafana and dashboards)

Visualize Prometheus data: the web interface, PromQL graphs, connecting to Grafana, RED and USE d...

Prometheus vs VictoriaMetrics: metrics scalability

Why choose VictoriaMetrics as an alternative to Prometheus for long-term storage and high perform...

Operating VictoriaMetrics: vmalert, backups, Kubernetes and monitoring

Evaluate rules and alerts with vmalert, back up with vmbackup, deploy on Kubernetes with the oper...

Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)

Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...

Why Grafana Mimir? Architecture and deployment modes

The limits of Prometheus alone, what Mimir brings (long-term storage, high availability, multi-te...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!