https://github.com/rcny/docker-events-forwarder-gelf
Send Docker events as GELF messages
https://github.com/rcny/docker-events-forwarder-gelf
docker gelf ruby
Last synced: about 1 year ago
JSON representation
Send Docker events as GELF messages
- Host: GitHub
- URL: https://github.com/rcny/docker-events-forwarder-gelf
- Owner: rcny
- License: mit
- Created: 2019-02-26T20:24:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T08:41:37.000Z (almost 6 years ago)
- Last Synced: 2025-04-02T16:11:10.265Z (about 1 year ago)
- Topics: docker, gelf, ruby
- Language: Ruby
- Size: 6.84 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
docker-events-forwarder-gelf
==========
This is small container-based utility which performs as an Docker events listener and sender to remote GELF inputs. It grabs arriving events as-is via the local UNIX socket and forwards them to remote endpoints.
### Configuration
All configuration is performed via environment variables:
```
HOST=
PORT=
PROTO=
CHUNK_SIZE=
```
You also have to set `HOST_HOSTNAME` variable or mount host's `/etc/hostname` as `/etc/host-hostname` inside the application container to get correct `source` field for your GELF message. Without that, you will be left with truncated container ID as message's `source`.
Currently forwarder simply connects to `unix:///var/run/docker.sock` and has no ability for Docker host configuration and authentication.
### Example usage
Run directly with Docker CLI:
`docker run -d -e HOST=foo.bar -e PORT=1337 -e PROTO=udp -e CHUNK_SIZE=lan -v /etc/hostname:/etc/host-hostname:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --restart unless-stopped rcny/docker-events-forwarder-gelf`