For the complete documentation index, see llms.txt. This page is also available as Markdown.

Filters as processors

You can use filters as processors in Fluent Bit. Placement restrictions depend on the filter: for example, in v5.2 or later, Rewrite tag supports only input processors and rejects output processor placement. Earlier versions accepted it as an output processor, but that placement wasn't reliable and shouldn't be used.

Only YAML configuration files support processors.

Examples

The following examples show how to configure filters as processors.

Grep

In this example, the Grep filter is used as an input processor to filter log events based on a regular expression pattern:

parsers:
    - name: json
      format: json

pipeline:
    inputs:
        - name: tail
          path: /var/log/example.log
          parser: json

          processors:
              logs:
                  - name: grep
                    regex: log aa
    outputs:
        - name: stdout
          match: '*'

Lua

In this example configuration, an input plugin uses the Lua filter as a processor to add a new key hostname with the value monox. Then, an output plugin adds a new key named output with the value new data.

Rewrite tag

Use Rewrite tag as an input processor to route records under a new tag and continue at the next processor stage of the same input. Its experimental batch_size option can group records by destination tag to reduce downstream processing overhead. Batching is disabled by default and can change interleaving between different destination tags.

Last updated

Was this helpful?