Public Repository

Last pushed: 2 years ago
Short Description
Logspout including Redis adapter for sending container logs to Logstash
Full Description

Quick start


docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro \
  rtoma/logspout-redis-logstash:latest redis://<your redis host>


Parameters to be specified using environment variables.

Some of the most important parameters:

  • REDIS_KEY=<key>: for changing the redis list key to which events are RPUSH'ed (default is logspout)
  • DEBUG=true: for enabling logspout debug logging
  • REDIS_DOCKER_HOST=myhost: for adding the hostname of your docker host to all events.

Have a look at for all parameters

JSON input support

v0.1.4 and later
Normally your application just writes freeform text to stdout/stderr. If you use JSON to structure your events, Logspout can use include structure in the JSON document send to Redis.

Example of a input JSON:

{"message":"something went bOOm!","level":"ERROR","logtype":"applog","line":42,"file":"source.go"}

This will end up like this in the JSON document send to Redis:

  "@timestamp": "2016-03-30T10:03:00.016733514Z",
  "host": "16cecd099d78",
  "message": "something went bOOm!",
  "docker": { ... }, 
  "logtype": "applog",
  "applog": {
    "file": "source.go",
    "level": "ERROR",
    "line": 42

For more information please read

Full example

If you want to see logspout working in an ELK stack, checkout the docker-compose.yml at:

Docker Pull Command