Open Source Datadog Alternative
Full-featured observability platform with metrics, logs, traces, and dashboards.
Overview
VictoriaMetrics is a fast, cost-effective time-series database designed as a high-performance alternative to Prometheus, offering significantly better data compression and query performance while maintaining full PromQL compatibility. Originally developed by VictoriaMetrics team in 2019, it has become a popular choice for organizations seeking to reduce infrastructure costs while scaling their metrics storage beyond Prometheus limitations. This observability stack combines VictoriaMetrics with Grafana for visualization, Loki for log aggregation, Tempo for distributed tracing, Vector for log collection, and Alertmanager for notifications.
This particular combination creates a comprehensive observability platform that rivals commercial solutions like Datadog by providing the three pillars of observability: metrics through VictoriaMetrics, logs through Loki, and traces through Tempo. The stack leverages Vector as a high-performance data pipeline for log collection and transformation, while Grafana serves as the unified interface for querying and visualizing all telemetry data. Alertmanager handles notification routing and alert deduplication across the entire stack, creating a cohesive monitoring experience.
This configuration is ideal for engineering teams, DevOps professionals, and organizations looking to implement enterprise-grade observability without the recurring costs of SaaS solutions. Startups burning through observability budgets, enterprises with data sovereignty requirements, and infrastructure teams managing Kubernetes clusters will find this stack particularly valuable. The combination provides the functionality of premium monitoring platforms while maintaining complete control over data retention, storage costs, and customization.
Key Features
- VictoriaMetrics high-compression storage with 90-day retention configured for long-term metrics analysis
- VMAgent automatic service discovery and metrics scraping with Prometheus configuration compatibility
- Loki label-based log indexing that dramatically reduces storage costs compared to full-text search solutions
- Tempo distributed tracing with OTLP receivers supporting both gRPC (4317) and HTTP (4318) protocols
- Vector high-performance log collection with Docker socket access for container log aggregation
- Grafana TraceQL editor integration for advanced trace querying and correlation with metrics
- Alertmanager notification routing with support for Slack, email, PagerDuty, and webhook integrations
- Cross-component correlation enabling jump from metrics to logs to traces within Grafana interface
Common Use Cases
- 1Kubernetes cluster monitoring with pod metrics, container logs, and distributed trace correlation
- 2Application performance monitoring for microservices architectures requiring trace analysis
- 3Infrastructure cost optimization by replacing expensive SaaS monitoring solutions
- 4Regulatory compliance environments requiring on-premises data retention and sovereignty
- 5Development teams needing full observability stack in local or staging environments
- 6High-volume metrics storage where Prometheus storage limitations become bottlenecks
- 7Multi-tenant environments requiring separate data isolation and retention policies
Prerequisites
- Minimum 4GB RAM recommended (VictoriaMetrics 512MB, Grafana 512MB, Loki 1GB, Tempo 512MB, others 256MB each)
- Available ports 3000, 3100, 3200, 4317, 4318, 8428, 8429, 8686, 9093 on host system
- Docker socket access permissions for Vector container log collection functionality
- Configuration files: loki-config.yml, tempo.yml, vector.toml, alertmanager.yml, and prometheus.yml
- Understanding of PromQL query language for VictoriaMetrics metrics exploration
- Familiarity with LogQL for Loki log querying and TraceQL for Tempo trace analysis
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 victoriametrics: 3 image: victoriametrics/victoria-metrics:latest4 ports: 5 - "8428:8428"6 volumes: 7 - vm_data:/victoria-metrics-data8 command: 9 - '--storageDataPath=/victoria-metrics-data'10 - '--retentionPeriod=90d'11 - '--httpListenAddr=:8428'12 networks: 13 - obs-net14 restart: unless-stopped1516 vmagent: 17 image: victoriametrics/vmagent:latest18 ports: 19 - "8429:8429"20 volumes: 21 - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro22 - vmagent_data:/vmagent-data23 command: 24 - '--promscrape.config=/etc/prometheus/prometheus.yml'25 - '--remoteWrite.url=http://victoriametrics:8428/api/v1/write'26 depends_on: 27 - victoriametrics28 networks: 29 - obs-net30 restart: unless-stopped3132 loki: 33 image: grafana/loki:latest34 ports: 35 - "3100:3100"36 volumes: 37 - ./loki-config.yml:/etc/loki/local-config.yaml:ro38 - loki_data:/loki39 command: -config.file=/etc/loki/local-config.yaml40 networks: 41 - obs-net42 restart: unless-stopped4344 tempo: 45 image: grafana/tempo:latest46 ports: 47 - "3200:3200"48 - "4317:4317"49 - "4318:4318"50 volumes: 51 - ./tempo.yml:/etc/tempo/tempo.yaml:ro52 - tempo_data:/tmp/tempo53 command: -config.file=/etc/tempo/tempo.yaml54 networks: 55 - obs-net56 restart: unless-stopped5758 vector: 59 image: timberio/vector:latest-alpine60 ports: 61 - "8686:8686"62 volumes: 63 - ./vector.toml:/etc/vector/vector.toml:ro64 - /var/run/docker.sock:/var/run/docker.sock:ro65 networks: 66 - obs-net67 restart: unless-stopped6869 alertmanager: 70 image: prom/alertmanager:latest71 ports: 72 - "9093:9093"73 volumes: 74 - ./alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro75 - alertmanager_data:/alertmanager76 command: 77 - '--config.file=/etc/alertmanager/alertmanager.yml'78 - '--storage.path=/alertmanager'79 networks: 80 - obs-net81 restart: unless-stopped8283 grafana: 84 image: grafana/grafana:latest85 ports: 86 - "3000:3000"87 environment: 88 - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}89 - GF_FEATURE_TOGGLES_ENABLE=traceqlEditor90 volumes: 91 - grafana_data:/var/lib/grafana92 - ./grafana/provisioning:/etc/grafana/provisioning93 depends_on: 94 - victoriametrics95 - loki96 - tempo97 networks: 98 - obs-net99 restart: unless-stopped100101volumes: 102 vm_data: 103 vmagent_data: 104 loki_data: 105 tempo_data: 106 alertmanager_data: 107 grafana_data: 108109networks: 110 obs-net: 111 driver: bridge.env Template
.env
1# Grafana2GRAFANA_PASSWORD=secure_grafana_password34# VictoriaMetrics5VM_RETENTION_PERIOD=90d67# Alertmanager Slack webhook (optional)8SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/xxx/xxxUsage Notes
- 1Grafana at http://localhost:3000
- 2VictoriaMetrics at http://localhost:8428
- 3Loki at http://localhost:3100
- 4Tempo traces at http://localhost:3200
- 5Create config files for Loki, Tempo, and Vector
Individual Services(7 services)
Copy individual services to mix and match with your existing compose files.
victoriametrics
victoriametrics:
image: victoriametrics/victoria-metrics:latest
ports:
- "8428:8428"
volumes:
- vm_data:/victoria-metrics-data
command:
- "--storageDataPath=/victoria-metrics-data"
- "--retentionPeriod=90d"
- "--httpListenAddr=:8428"
networks:
- obs-net
restart: unless-stopped
vmagent
vmagent:
image: victoriametrics/vmagent:latest
ports:
- "8429:8429"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- vmagent_data:/vmagent-data
command:
- "--promscrape.config=/etc/prometheus/prometheus.yml"
- "--remoteWrite.url=http://victoriametrics:8428/api/v1/write"
depends_on:
- victoriametrics
networks:
- obs-net
restart: unless-stopped
loki
loki:
image: grafana/loki:latest
ports:
- "3100:3100"
volumes:
- ./loki-config.yml:/etc/loki/local-config.yaml:ro
- loki_data:/loki
command: "-config.file=/etc/loki/local-config.yaml"
networks:
- obs-net
restart: unless-stopped
tempo
tempo:
image: grafana/tempo:latest
ports:
- "3200:3200"
- "4317:4317"
- "4318:4318"
volumes:
- ./tempo.yml:/etc/tempo/tempo.yaml:ro
- tempo_data:/tmp/tempo
command: "-config.file=/etc/tempo/tempo.yaml"
networks:
- obs-net
restart: unless-stopped
vector
vector:
image: timberio/vector:latest-alpine
ports:
- "8686:8686"
volumes:
- ./vector.toml:/etc/vector/vector.toml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- obs-net
restart: unless-stopped
alertmanager
alertmanager:
image: prom/alertmanager:latest
ports:
- "9093:9093"
volumes:
- ./alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro
- alertmanager_data:/alertmanager
command:
- "--config.file=/etc/alertmanager/alertmanager.yml"
- "--storage.path=/alertmanager"
networks:
- obs-net
restart: unless-stopped
grafana
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on:
- victoriametrics
- loki
- tempo
networks:
- obs-net
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 victoriametrics:5 image: victoriametrics/victoria-metrics:latest6 ports:7 - "8428:8428"8 volumes:9 - vm_data:/victoria-metrics-data10 command:11 - '--storageDataPath=/victoria-metrics-data'12 - '--retentionPeriod=90d'13 - '--httpListenAddr=:8428'14 networks:15 - obs-net16 restart: unless-stopped1718 vmagent:19 image: victoriametrics/vmagent:latest20 ports:21 - "8429:8429"22 volumes:23 - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro24 - vmagent_data:/vmagent-data25 command:26 - '--promscrape.config=/etc/prometheus/prometheus.yml'27 - '--remoteWrite.url=http://victoriametrics:8428/api/v1/write'28 depends_on:29 - victoriametrics30 networks:31 - obs-net32 restart: unless-stopped3334 loki:35 image: grafana/loki:latest36 ports:37 - "3100:3100"38 volumes:39 - ./loki-config.yml:/etc/loki/local-config.yaml:ro40 - loki_data:/loki41 command: -config.file=/etc/loki/local-config.yaml42 networks:43 - obs-net44 restart: unless-stopped4546 tempo:47 image: grafana/tempo:latest48 ports:49 - "3200:3200"50 - "4317:4317"51 - "4318:4318"52 volumes:53 - ./tempo.yml:/etc/tempo/tempo.yaml:ro54 - tempo_data:/tmp/tempo55 command: -config.file=/etc/tempo/tempo.yaml56 networks:57 - obs-net58 restart: unless-stopped5960 vector:61 image: timberio/vector:latest-alpine62 ports:63 - "8686:8686"64 volumes:65 - ./vector.toml:/etc/vector/vector.toml:ro66 - /var/run/docker.sock:/var/run/docker.sock:ro67 networks:68 - obs-net69 restart: unless-stopped7071 alertmanager:72 image: prom/alertmanager:latest73 ports:74 - "9093:9093"75 volumes:76 - ./alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro77 - alertmanager_data:/alertmanager78 command:79 - '--config.file=/etc/alertmanager/alertmanager.yml'80 - '--storage.path=/alertmanager'81 networks:82 - obs-net83 restart: unless-stopped8485 grafana:86 image: grafana/grafana:latest87 ports:88 - "3000:3000"89 environment:90 - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD}91 - GF_FEATURE_TOGGLES_ENABLE=traceqlEditor92 volumes:93 - grafana_data:/var/lib/grafana94 - ./grafana/provisioning:/etc/grafana/provisioning95 depends_on:96 - victoriametrics97 - loki98 - tempo99 networks:100 - obs-net101 restart: unless-stopped102103volumes:104 vm_data:105 vmagent_data:106 loki_data:107 tempo_data:108 alertmanager_data:109 grafana_data:110111networks:112 obs-net:113 driver: bridge114EOF115116# 2. Create the .env file117cat > .env << 'EOF'118# Grafana119GRAFANA_PASSWORD=secure_grafana_password120121# VictoriaMetrics122VM_RETENTION_PERIOD=90d123124# Alertmanager Slack webhook (optional)125SLACK_WEBHOOK_URL=https://hooks.slack.com/services/xxx/xxx/xxx126EOF127128# 3. Start the services129docker compose up -d130131# 4. View logs132docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/datadog-alternative/run | bashTroubleshooting
- VictoriaMetrics 'no space left on device' error: Increase Docker volume size or adjust --retentionPeriod to reduce storage usage
- Loki 'entry out of order' ingestion failures: Configure Vector or log shippers with proper timestamp sorting and batch settings
- Tempo traces not appearing in Grafana: Verify OTLP endpoint connectivity and check tempo.yml receiver configuration matches application instrumentation
- Vector container logs not collected: Ensure Docker socket mount permissions and check vector.toml Docker source configuration
- Grafana data source connection timeouts: Verify inter-service network connectivity and check service health endpoints before configuring data sources
- Alertmanager notifications not sending: Validate alertmanager.yml routing configuration and test webhook/SMTP connectivity from container network
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
victoriametricsgrafanalokitempovectoralertmanager
Tags
#monitoring#observability#metrics#logs#traces
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download