fluentd icon indicating copy to clipboard operation
fluentd copied to clipboard

fluentd command: add --with-source-only

Open daipom opened this issue 1 year ago • 0 comments

Which issue(s) this PR fixes: None. Related to

  • #4622

This feature may be useful on its own, but mainly, this feature will help #4622 feature.

What this PR does / why we need it: Add --with-source-only option to fluentd command. (Ref: Similar to existing --without-source option)

It launches Fluentd with Input plugins only. Here is the specification.

  • Those Input plugins emits the events to SourceOnlyBufferAgent.
  • The events is kept in the buf_file during the source-only-mode.
  • SIGRTMIN(34) cancels the mode.
  • After canceled, the new agent starts to load the buffer.

Docs Changes: TODO

Release Note:

  • fluentd command: add --with-source-only
  • embedded plugin: add out_buffer plugin, which can be used for buffering and relabeling events.

new plugin: out_buffer

This feature internally uses the new plugin out_buffer. This plugin can be used for buffering and relabeling events.

Example: in_udp -> out_buffer -> out_stdout

<source>
  @type udp
  tag foo.udp
  @label @buffer
  <parse>
    @type none
  </parse>
</source>

<match foo.**>
  @type stdout
</match>

<label @buffer>
  <match **>
    @type buffer
    @label @ROOT
    <buffer>
      path /path/to/buffer
    </buffer>
  </match>
</label>

TODO

  • [ ] Consider race condition
  • [ ] Fix and add tests
  • [ ] Consider how to stop the loading agent
  • [ ] Consider configurablity of SourceOnlyBufferAgent.
  • [ ] Consider Windows support

daipom avatar Oct 08 '24 02:10 daipom