Yet another out_file fluentd plugin which uses the tag name as the path of log file.
#1 Compare This branch is even with yuku-t:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is similar to the file build-in output plugin, but tag_file decides output directory using tag of events.


% gem install fluent-plugin-tagfile


<match prefix.**>
  type tag_file

  path /var/log/fluent
  compress gzip

  time_slice_format %Y/%m/%d/%H/%M
  flush_interval 10m

Fluent with such conf file behaves as follows. Suppose that tag is and time is 2012/02/01 18:46.

  1. Look for all events whose tag starts with prefix..

  2. Create buffer file in path directory such as /var/log/fluent/buffer.xxxxx.

  3. In every minutes, fluent tries to flush the buffer, then /var/log/fluent/foo/bar/2012/02/01/18/46/N.log.gz is created. N is a unique number in the directory.

If time_slice_format includes / like this example, it is used as the directory hierarchy.

See also