Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
multi-worker-process: Add multiple worker assign syntax description
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Feb 26, 2019
1 parent 03a2d50 commit 6ac3c92
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions docs/v1.0/multi-process-workers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,82 @@ Some plugins don't work on multi process worker, e.g. `in_tail`. For such plugin

With this directive, you can mix multi-process ready and non-multi-process ready plugins in 1 instance.

### &lt;worker N-M&gt; directive

As of Fluentd v1.4.0, `<worker N-M>` syntax has been introduced:

:::text
<system>
workers 6
</system>

<worker 0-1>
<source>
@type forward
</source>

<filter test>
@type record_transformer
enable_ruby
<record>
worker_id ${ENV['SERVERENGINE_WORKER_ID']}
</record>
</filter>

<match test>
@type stdout
</match>
</worker>
# work on worker 0 and worker 1.

<worker 2-3>
<source>
@type tcp
<parse>
@type none
</parse>
tag test
</source>

<filter test>
@type record_transformer
enable_ruby
<record>
worker_id ${ENV['SERVERENGINE_WORKER_ID']}
</record>
</filter>

<match test>
@type stdout
</match>
</worker>
# work on worker 2 and worker 3.

<worker 4-5>
<source>
@type udp
<parse>
@type none
</parse>
tag test
</source>

<filter test>
@type record_transformer
enable_ruby
<record>
worker_id ${ENV['SERVERENGINE_WORKER_ID']}
</record>
</filter>

<match test>
@type stdout
</match>
</worker>
# work on worker 4 and worker 5.

With this directive, you can specify multiple workers per worker directive.

### root_dir/@id parameter

These parameters must be specified when you use file buffer.
Expand Down

0 comments on commit 6ac3c92

Please sign in to comment.