Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

ymizushi/fluent-plugin-tail-ex-rotate

Repository files navigation

fluent-plugin-tail-ex-rotate

Build Status

fluent-plugin-tail-ex-rotate is a fluentd plugin to manage the timing of file rotation.

Install

gem install fluent-plugin-tail-ex-rotate

Test

bundle install
rake test

Setting

The setting of fluent-plugin-tail-ex-rotate is roughly the same with in_tail built-in plugin. Difference between fluent-plugin-tail-ex-rotate and in_tail built-in plugin setting are :expand_rotate_time attribute.

:expand_rotate_time attribute must be set number of seconds.

For example,

<source>
  type tail_ex_rotate
  path /var/log/httpd/access_log.%Y%m%d
  tag access_process_time
  pos_file /var/log/td-agent/httpd-access.log.pos
  time_format %d/%b/%Y:%H:%M:%S %z
  expand_rotate_time 18000s
  types process_time:integer
</source>

Daily file lotation starts with 05:00 beacause of this setting.