An open API service indexing awesome lists of open source software.

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

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`