Skip to content

Conversation

@eschabell
Copy link
Collaborator

Update the filter docs with YAML configuration examples, the first half of filters in list. Fixes #1872.

Updated the following:

eschabell added 11 commits July 7, 2025 16:03
@eschabell eschabell requested review from a team as code owners July 7, 2025 16:04
@patrick-stephens patrick-stephens merged commit bbed530 into fluent:master Jul 7, 2025
5 checks passed
Copy link
Contributor

@esmerel esmerel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistic suggestions mostly but otherwise this covers a lot of good updates.


```shell
bin/fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf
$ ./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ ./fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf
fluent-bit -c /PATH_TO_CONF_FILE/fluent-bit.conf

We don't put the prompt in commands - it prevents a direct copy & paste, and markdownlint errors.

Comment on lines +38 to +39
Below configurations assume a properly configured parsers file and 'storage.path' variable defined in the services
section of the fluent bit configuration (not shown below).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Below configurations assume a properly configured parsers file and 'storage.path' variable defined in the services
section of the fluent bit configuration (not shown below).
The following configurations assume a properly configured parsers file and `storage.path` variable defined in the services section of the Fluent Bit configuration (not shown).

We try not to use positional language, and we can't use line wraps because gitbook renders them and it makes the pages look bad.

#### Example 3: Attach cluster metadata to non-container logs

This examples shows a use case for the `Cluster_Metadata_Only` option- attaching cluster metadata to ECS Agent logs.
This examples shows a use case for the `Cluster_Metadata_Only` option attaching cluster metadata to ECS Agent logs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This examples shows a use case for the `Cluster_Metadata_Only` option attaching cluster metadata to ECS Agent logs.
This example shows a use case for the `Cluster_Metadata_Only` option attaching cluster metadata to ECS Agent logs.

You can run the filter from command line:

```shell
$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Record=hostname ${HOSTNAME}' -p 'Record=product Awesome_Tool' -m '*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Record=hostname ${HOSTNAME}' -p 'Record=product Awesome_Tool' -m '*'
fluent-bit -i mem -o stdout -F record_modifier -p 'Record=hostname ${HOSTNAME}' -p 'Record=product Awesome_Tool' -m '*'

You can also run the filter from command line.

```shell
$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Remove_key=Swap.total' -p 'Remove_key=Swap.free' -p 'Remove_key=Swap.used' -m '*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Remove_key=Swap.total' -p 'Remove_key=Swap.free' -p 'Remove_key=Swap.used' -m '*'
fluent-bit -i mem -o stdout -F record_modifier -p 'Remove_key=Swap.total' -p 'Remove_key=Swap.free' -p 'Remove_key=Swap.used' -m '*'

```shell copy
fluent-bit -i mem -o stdout -F record_modifier -p 'Allowlist_key=Mem.total' -p 'Allowlist_key=Mem.free' -p 'Allowlist_key=Mem.used' -m '*'
```shell
$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Allowlist_key=Mem.total' -p 'Allowlist_key=Mem.free' -p 'Allowlist_key=Mem.used' -m '*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ ./fluent-bit -i mem -o stdout -F record_modifier -p 'Allowlist_key=Mem.total' -p 'Allowlist_key=Mem.free' -p 'Allowlist_key=Mem.used' -m '*'
fluent-bit -i mem -o stdout -F record_modifier -p 'Allowlist_key=Mem.total' -p 'Allowlist_key=Mem.free' -p 'Allowlist_key=Mem.used' -m '*'

The script creates the shared library
`bazel-bin/tensorflow/lite/c/libtensorflowlite_c.so`.
1. Copy the library to a location such as `/usr/lib` that can be used by Fluent Bit.
4. Copy the library to a location such as `/usr/lib` that can be used by Fluent Bit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Copy the library to a location such as `/usr/lib` that can be used by Fluent Bit.
1. Copy the library to a location such as `/usr/lib` that can be used by Fluent Bit.

Markdown increments numbers on its own. We do not increment numbers.

```bash
cmake -DFLB_FILTER_TENSORFLOW=On -DTensorflow_DIR=<AddressOfTensorflowSourceCode> ...
```shell
$ ./cmake -DFLB_FILTER_TENSORFLOW=On -DTensorflow_DIR=<AddressOfTensorflowSourceCode> ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ ./cmake -DFLB_FILTER_TENSORFLOW=On -DTensorflow_DIR=<AddressOfTensorflowSourceCode> ...
cmake -DFLB_FILTER_TENSORFLOW=On -DTensorflow_DIR=<AddressOfTensorflowSourceCode> ...

```bash
bin/fluent-bit -i mqtt -p 'tag=mqtt.data' -F tensorflow -m '*' -p 'input_field=image' -p 'model_file=/home/user/model.tflite' -p
```shell
$ ./fluent-bit -i mqtt -p 'tag=mqtt.data' -F tensorflow -m '*' -p 'input_field=image' -p 'model_file=/home/user/model.tflite' -p
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$ ./fluent-bit -i mqtt -p 'tag=mqtt.data' -F tensorflow -m '*' -p 'input_field=image' -p 'model_file=/home/user/model.tflite' -p
fluent-bit -i mqtt -p 'tag=mqtt.data' -F tensorflow -m '*' -p 'input_field=image' -p 'model_file=/home/user/model.tflite' -p

@eschabell eschabell deleted the erics-filters-yaml-updates branch July 8, 2025 09:31
TomlinfreeGit pushed a commit to TomlinfreeGit/fluent-bit-docs that referenced this pull request Oct 28, 2025
…lf of filters in list. Fixes fluent#1872. (fluent#1873)

* Adding YAML examples for aws metadata filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for ecs metadata filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for geoip2 filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for kubernetes filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for lua filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for record modifier filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for nightfall filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for standard output filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for throttle filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for tensorflow filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

* Adding YAML examples for multiline stacktrace filter doc. Part of issue fluent#1872.

Signed-off-by: Eric D. Schabell <[email protected]>

---------

Signed-off-by: Eric D. Schabell <[email protected]>
Signed-off-by: Tom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing YAML examples for Filters docs.

3 participants