Skip to content

Instantly share code, notes, and snippets.

@jjcodes78
Created April 24, 2022 06:27
Show Gist options
  • Save jjcodes78/2597d7f5dea6e9698931dce5e4c1f21e to your computer and use it in GitHub Desktop.
Save jjcodes78/2597d7f5dea6e9698931dce5e4c1f21e to your computer and use it in GitHub Desktop.
Grafana Stack (Grafana + Prometheus + Loki + Promtail + Node Exporter)
version: '3.8'
networks:
monitoring:
driver: bridge
volumes:
prometheus_data: {}
services:
grafana:
image: grafana/grafana-oss
container_name: grafana
volumes:
- ./grafana-storage:/var/lib/grafana
ports:
- 3000:3000
networks:
- monitoring
extra_hosts:
- dockerhost:172.15.21.10
promtail:
image: grafana/promtail:2.4.1
container_name: promtail
volumes:
- ./prom-logs:/var/log
command: -config.file=/etc/promtail/config.yml
ports:
- 9080:9080
networks:
- monitoring
loki:
image: grafana/loki
container_name: loki
volumes:
- ./grafana-storage:/loki
ports:
- 3100:3100
networks:
- monitoring
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
expose:
- 9100
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
expose:
- 9090
networks:
- monitoring
@nenodias
Copy link

Is there a version with Grafana Tempo for tracing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment