Skip to content

Docker Monitoring Stack - VictoriaMetrics & VictoriaLogs Cluster

duyhenryer/docker-monitoring-vvc-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Monitoring Stack - VictoriaMetrics & VictoriaLogs Cluster

Overview

A comprehensive monitoring and logging stack built with Docker Compose featuring high-performance VictoriaMetrics and VictoriaLogs clusters. This stack provides:

Core Components

Data Collection

Additional Tools

Architecture

VictoriaMetrics cluster deployment

VictoriaMetrics Cluster

The VictoriaMetrics cluster consists of multiple components for high availability and performance:

  • 2x VMInsert (vminsert-1, vminsert-2): Handle metrics ingestion
  • 2x VMStorage (vmstorage-1, vmstorage-2): Store time-series data with 15-day retention
  • 2x VMSelect (vmselect-1, vmselect-2): Query time-series data.
  • VMAuth: Authentication proxy and load balancer.

VictoriaLogs Cluster

The VictoriaLogs cluster provides fast log aggregation and search capabilities:

  • VLInsert: Handles log ingestion
  • 2x VLStorage (vlstorage-1, vlstorage-2): Store log data with 4-week retention
  • 2x VLSelect (vlselect-1, vlselect-2): Query log data
  • Vector: High-performance log collector that gathers Docker container logs
  • Log Generator: Generates sample logs for testing and demonstration

Setup

Environment Variables

Copy the example environment file:

cp env.example .env

⚠️ Important: If you change VMAUTH_USERNAME or VMAUTH_PASSWORD, you must also update:

  1. configs/vm/auth-vm-cluster.yml
  2. configs/grafana/provisioning/datasources.yml

Bootstrap

Boot the stack with docker compose.

docker-compose up -d

Ensure all containers are running:

docker-compose ps -a

Access Grafana

Access Grafana on http://localhost:3000 and you should see the pre-configured dashboards:

  • Node Metrics: Host system performance and resource usage
  • Container Metrics: Docker container performance and health
  • VMagent: Metrics collection and forwarding status
  • VMAuth: Authentication proxy and load balancer metrics
  • VMAlert: Alerting rules and evaluation status
  • VM Cluster: VictoriaMetrics cluster health and performance
  • VictoriaLogs: Log aggregation and search metrics
  • VictoriaLogs Cluster: VictoriaLogs cluster health and performance

Service Endpoints

The following services are available:

Service Internal Endpoint External Endpoint Description
Grafana http://grafana:3000 http://localhost:3000 Main dashboard interface
VMAuth http://vmauth:8427 http://localhost:8427 Authentication proxy & load balancer
VMagent http://vmagent:8429 http://localhost:8429 Metrics collection agent
VMAlert http://vmalert:8880 http://localhost:8880 Alerting rules engine
Alertmanager http://alertmanager:9093 http://localhost:9093 Alert routing & management
Alert Receiver http://uncomplicated-alert-receiver:9094 http://localhost:9094 Alert management UI
SQL-to-LogsQL http://sql-to-logsql:8080 http://localhost:8080 SQL interface for logs
Node-Exporter http://node-exporter:9100 N/A Host metrics (internal)
cAdvisor http://cadvisor:8080 N/A Container metrics (internal)
Vector http://vector:8686 N/A Log collector (healthcheck)
Vector Metrics http://vector:9598 N/A Vector metrics (internal)
Log Generator N/A N/A Sample log generation (internal)

Cleanup

To remove the containers using docker compose (or make clean):

docker-compose down

To remove containers and volumes (complete cleanup):

docker-compose down -v

About

Docker Monitoring Stack - VictoriaMetrics & VictoriaLogs Cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published