Add Promtail to ship Docker container logs to Loki
Loki was running but had no log shipper — no labels or logs were visible in Grafana. Adds Promtail to scrape all Docker container logs and push them to Loki. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
38565f8cc2
commit
5a19217b33
2 changed files with 33 additions and 0 deletions
|
|
@ -128,6 +128,17 @@ services:
|
|||
- /var/lib/docker/:/var/lib/docker:ro
|
||||
- /dev/disk/:/dev/disk:ro
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/log:/var/log:ro
|
||||
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||||
- ./promtail/promtail-config.yml:/etc/promtail/config.yml:ro
|
||||
command: ["-config.file=/etc/promtail/config.yml"]
|
||||
depends_on:
|
||||
- loki
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
restart: unless-stopped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue