Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

Docker Image: fluentd

Debian jessie image with fluentd log collector.

The following plugin will also be installed:

  • fluent-plugin-elasticsearch



Fluent configuration directory, expect fluent.conf file.

Example usage

Collect all containers logs and send them to elasticsearch container.

docker run --link elastic:elastic  -d -v /var/lib/docker/containers:/var/lib/docker/containers fluentd

:warning: We have an elasticsearch container named elastic, so we forward log to ELASTIC_PORT_9200_TCP_ADDR.


  type tail
  read_from_head true
  path /var/lib/docker/containers/*/*-json.log
  pos_file /var/log/fluentd-docker.pos
  time_format %Y-%m-%dT%H:%M:%S
  tag docker.*
  format json

# Using filter to add container IDs to each event
<filter docker.var.lib.docker.containers.*.*.log>
  type record_transformer
    container_id ${tag_parts[5]}

<match docker.var.lib.docker.containers.*.*.log>
  type elasticsearch
  logstash_format true
  host "#{ENV['ELASTIC_PORT_9200_TCP_ADDR']}" # dynamically configured to use Docker's link feature
  port 9200
  flush_interval 5s


MIT © Maxime Loliée

Docker Pull Command
Source Repository