diff --git a/SUMMARY.md b/SUMMARY.md index ea3ab6cea..e7c42940e 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -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) diff --git a/pipeline/processors/README.md b/pipeline/processors/README.md index c1f055904..2dd91aa1e 100644 --- a/pipeline/processors/README.md +++ b/pipeline/processors/README.md @@ -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 diff --git a/pipeline/processors/filters.md b/pipeline/processors/filters.md new file mode 100644 index 000000000..12a6003fd --- /dev/null +++ b/pipeline/processors/filters.md @@ -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 %}