Name: logspout-redis-logstash
Owner: Bisnode Informatics Deutschland
Description: Logspout adapter for writing Docker container logs to Redis in Logstash jsonevent layout
Forked from: rtoma/logspout-redis-logstash
Created: 2016-02-04 10:30:47.0
Updated: 2016-02-04 10:30:48.0
Pushed: 2016-05-27 11:59:28.0
Homepage: null
Size: 110
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Logspout adapter for writing Docker container stdout/stderr logs to Redis in Logstash jsonevent layout.
See the example below for more information.
Logspout including this adapter is available on Docker Hub. Pull it with:
cker pull rtoma/logspout-redis-logstash
cker run -d --name logspout \
/var/run/docker.sock:/var/run/docker.sock:ro \
oma/logspout-redis-logstash \
dis://<your-redis-server>?key=bla&...
Some configuration can be passed via container environment keys.
Some can be passed via route options (e.g. logspout redis://<host>?key=foo&password=secret
).
This table shows all configuration parameters:
| Parameter | Default | Environment key | Route option key |
|———–|———|—————–|——————|
| Enable debug, if set debug logging will be printed | disabled | DEBUG | debug |
| Redis password, if set this will force the adapter to execute a Redis AUTH command | none | REDIS_PASSWORD | password |
| Redis key, events will be pushed to this Redis list object | 'logspout' | REDIS_KEY | key |
| Redis database, if set the adapter will execute a Redis SELECT command | 0 | REDIS_DATABASE | database |
| Docker host, will add a docker.host=
Want to add features? Feel welcome to submit a pull request!
If you are unable to code, feel free to create a issue describing your feature request or bug report.
Try out logspout with redis-logstash adapter in a full ELK stack. A docker-compose.yml can be found in the example/ directory.
When logspout with adapter is running. Executing something like:
er run --rm centos:7 echo hello from a container
Will result in a corresponding event in Elasticsearch. Below is a screenshot from Kibana4:
Thanks to Gliderlabs for creating Logspout!
For other credits see the header of the redis.go source file.