This repository contains a Docker Compose setup for a complete monitoring and observability stack using Grafana, Prometheus, Loki, Tempo, and Alloy with OpenTelemetry.
-
Grafana
- Image:
grafana/grafana-oss:11.1.1 - Configuration: Mounted from
./grafana/to/etc/grafana/ - Data Storage: Mounted from
grafana-storagevolume to/var/lib/grafana - Exposed Ports:
3000(Grafana UI)
- Image:
-
Prometheus
- Image:
prom/prometheus:v2.54.0 - Configuration: Mounted from
./prometheus/to/etc/prometheus/ - Data Storage: Mounted from
prometheus-storagevolume to/prometheus - Exposed Ports: None (can be uncommented in
docker-compose.yaml)
- Image:
-
Loki
- Image:
grafana/loki:3.1.0 - Configuration: Mounted from
./loki/to/etc/loki/ - Data Storage: Mounted from
loki-storagevolume to/loki - Exposed Ports: None (can be uncommented in
docker-compose.yaml)
- Image:
-
Tempo
- Image:
grafana/tempo:2.5.0 - Configuration: Mounted from
./tempo/tempo.yamlto/etc/tempo.yaml - Data Storage: Mounted from
tempo-storagevolume to/var/tempo - Exposed Ports: None (can be uncommented in
docker-compose.yaml)
- Image:
-
Alloy
- Image:
grafana/alloy:latest - Configuration: Mounted from
./alloy/config.alloyto/etc/alloy/config.alloy - Exposed Ports:
4317(GRPC)4318(HTTP)
- Image:
All services are connected to a Docker network named back-tier.
grafana-storage: Persistent storage for Grafana data.prometheus-storage: Persistent storage for Prometheus data.loki-storage: Persistent storage for Loki data.tempo-storage: Persistent storage for Tempo data.
- Grafana: grafana/grafana.ini
- Prometheus: prometheus/prometheus.yml
- Loki: loki/local-config.yaml
- Tempo: tempo/tempo.yaml
- Alloy: alloy/config.alloy
To start the stack, run:
docker-compose up -dTo stop the stack, run:
docker-compose down- Grafana: 3000
- Alloy: 4317 (OTEL Grpc), 4318 (OTEL HTTP)
Uncomment the relevant lines in docker-compose.yaml to expose additional ports for Prometheus, Loki, and Tempo if needed.