fluent/fluentd

View on GitHub
example/worker_section.conf

Summary

Maintainability
Test Coverage
<system>
  workers 4
  root_dir /path/fluentd/root
</system>

<source> # top-level sections works on all workers in parallel
  @type forward
  port 24224
</source>

<match all> # this sections also works on all workers in parallel
  @type stdout
  <inject>
    worker_id_key worker_id
  </inject>
</match>

<worker 0> # this section works only on first worker process
  <source>
    @type tail
    format none
    path /var/log/fluentd_test.log
    pos_file /var/log/fluentd_test.pos
    tag tail
    rotate_wait 5
    read_from_head true
    refresh_interval 60
  </source>

  <match tail>
    @type stdout
    <inject>
      worker_id_key worker_id
    </inject>
  </match>
</worker>