Skip to content

Document filters as processors #1605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
* [Metrics Selector](pipeline/processors/metrics-selector.md)
* [OpenTelemetry Envelope](pipeline/processors/opentelemetry-envelope.md)
* [SQL](pipeline/processors/sql.md)
* [Filters as processors](pipeline/processors/filters.md)
* [Conditional processing](pipeline/processors/conditional-processing.md)
* [Filters](pipeline/filters/README.md)
* [AWS Metadata](pipeline/filters/aws-metadata.md)
Expand Down
1 change: 1 addition & 0 deletions pipeline/processors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Fluent Bit offers the following processors:
- [OpenTelemetry Envelope](opentelemetry-envelope.md): Transform logs into an
OpenTelemetry-compatible format.
- [SQL](sql.md): Use SQL queries to extract log content.
- [Filters](filters.md): Any filter can be used as a processor.

## Features

Expand Down
24 changes: 24 additions & 0 deletions pipeline/processors/filters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Filters as processors

Any Fluent Bit [filter](../filters/README.md) can be used as a processor.

## Grep example

In this example, the [Grep](../filters/grep.md) filter is used as an output processor that sends log records only if they match a specified regular expression.

{% code title="fluent-bit.yaml" %}
```yaml
pipeline:
inputs:
- name: tail
path: lines.txt
parser: json
outputs:
- name: stdout
match: '*'
processors:
logs:
- name: grep
regex: log aa
```
{% endcode %}