A comprehensive monitoring and logging stack built with Docker Compose featuring high-performance VictoriaMetrics and VictoriaLogs clusters. This stack provides:
- Grafana: Advanced dashboarding and visualization
- VictoriaMetrics Cluster: High-performance time-series database (replaces Prometheus)
- VictoriaLogs Cluster: Fast log aggregation and search
- VMagent: Metrics collection and forwarding
- VMAuth: Authentication proxy and load balancer
- VMAlert: Alerting and recording rules engine
- Alertmanager: Alert routing and management
- Uncomplicated Alert Receiver: Alert management UI
- Node-Exporter: Host system metrics
- cAdvisor: Container metrics
- Vector: High-performance log collector
- Log Generator: Sample log generation for testing
- SQL-to-LogsQL: Query VictoriaLogs using SQL syntax
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.
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
Copy the example environment file:
cp env.example .envVMAUTH_USERNAME or VMAUTH_PASSWORD, you must also update:
configs/vm/auth-vm-cluster.ymlconfigs/grafana/provisioning/datasources.yml
Boot the stack with docker compose.
docker-compose up -dEnsure all containers are running:
docker-compose ps -aAccess 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
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) |
To remove the containers using docker compose (or make clean):
docker-compose downTo remove containers and volumes (complete cleanup):
docker-compose down -v