No commit activity in last 3 years
No release in over 3 years
Fluent output plugin to handle output directory by source host using events tag.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

 Project Readme

#fluent-plugin-tagfile

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

##Installation

% gem install fluent-plugin-tagfile

##Example

#/etc/fluentd/fluent.conf
<match prefix.**>
  type tag_file

  path /var/log/fluent
  compress gzip

  time_slice_format %Y/%m/%d/%H/%M
  flush_interval 10m
</match>

Fluent with such conf file behaves as follows. Suppose that tag is prefix.foo.bar 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

http://fluentd.org/doc/plugin.html#file