Docker Compose stack for monitoring: metrics, logs, and visualization.
| Service | Port | Purpose |
|---|---|---|
| Grafana | 3030 | Dashboards |
| Prometheus | 9090 | Metrics storage |
| Loki | 3100 | Log aggregation |
| Alloy | 12345 | Docker log collector |
| Netdata | 19999 | System metrics |
- Clone and configure:
git clone https://github.com/BravePT/observability.git
cd observability
cp .env.example .env-
Edit
.envwith your credentials andprometheus/prometheus.ymlwith your target IPs. -
Create data directories:
sudo mkdir -p /opt/docker/{grafana/data,prometheus/data,loki/data,netdata/{config,data,cache}}
sudo chown -R 10001:10001 /opt/docker/loki/data- Start:
docker compose up -dAfter deployment, add:
- Prometheus:
http://prometheus:9090 - Loki:
http://loki:3100
- Prometheus targets:
prometheus/prometheus.yml - Log retention (default 7 days):
loki/loki-config.yml→retention_period - Alloy: Auto-discovers Docker containers and ships logs to Loki
MIT