Send your docker containers logs to some other place with this automatic `fluentd` and `docker-gen` based image
8.7K
Docker image with:
which tails docker containers logs and sends them to an elasticsearch host
By default it adds some additional tags using record-modifier plugin and sends only stderr logs.
Elasticsearch info is controlled by ES_HOST and ES_PORT variables which will be overwritten if you link elastic search container.
Fluentd config is created using /app/config/fluentd.tmpl docker-gen template and could be easily overwritten in custom Dockerfile:
ADD my-custom-fluentd-template.tmpl /app/config/fluentd.tmpl
docker run -d -v /var/run/docker.sock:/tmp/docker.sock -v /var/lib/docker:/var/lib/docker michaloo/fluentd
By default only stderr logs from container created with "LOG=true" environmental variable would be send.
Provided example assumes using crane.
Change dir to examples/ and execute crane lift. This will bring three containers:
After lifting them up you can go to
http://your-docker-host:9200/_plugin/kibana3/index.html#/dashboard/file/logstash.json
to see the example logs (you may need to wait a minute for logs to show).
Content type
Image
Digest
sha256:3ab8b356f…
Size
140.4 MB
Last updated
over 10 years ago
docker pull michaloo/fluentd