Files
monitoring-ng/compose.docker-events.yml
simon 779dee5a0d allow scraping of docker events (#32)
another one! closes #15

again, the compose-snippet was generated using Claude, but verified and tested manually.
Thought of using a socket-proxy just as traefik does, but since alloy has socket access anyways and the official docker image should be as safe as it gets, I think this should be alright.

## Loki log preview
![grafik.png](/attachments/013605e9-9abc-47ef-8cb9-c118fbaec3b5)

Reviewed-on: #32
Reviewed-by: moritz <98+moritz@noreply.git.coopcloud.tech>
Co-authored-by: Simon <s.thiessen@local-it.org>
2026-09-22 10:33:47 +00:00

20 lines
486 B
YAML

version: "3.8"
services:
docker-events:
image: docker:29.8.1-cli
command: >
docker events
--format '{{json .}}'
--filter type=container
--filter event=start
--filter event=die
--filter event=kill
--filter event=oom
--filter event=restart
--filter event=stop
--filter event=health_status
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
deploy:
restart_policy:
condition: on-failure