Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f84fcb0
feat: add config example validation script and workflow
patrick-stephens Jul 17, 2026
d7e030b
fix: suppress known failures due to unrelated Fluent Bit issue 12113
patrick-stephens Jul 19, 2026
a59ef51
fix: resolve incorrect syntax in parsers configuration
patrick-stephens Jul 19, 2026
e9c40c5
fix: missing quote for dummy config in geoip filter
patrick-stephens Jul 19, 2026
f8fa2d4
fix: incorrect comment format used in buffering examples
patrick-stephens Jul 19, 2026
8123602
fix: naming of parser files
patrick-stephens Jul 19, 2026
e509bf9
fix: incorrect format and quoting for dynatrace
patrick-stephens Jul 19, 2026
06cf0c6
fix: remove redundant and incorrect parser definition for gelf output
patrick-stephens Jul 19, 2026
cdfbefe
fix: rename tab titles to match usage for containers
patrick-stephens Jul 19, 2026
0f4b0ca
fix: use correct language block for legacy config in cpu-metrics input
patrick-stephens Jul 19, 2026
68c4681
fix: remove tab for conditional processing YAML definition block
patrick-stephens Jul 19, 2026
55ff47d
fix: suppress known failures due to Windows kubelet config
patrick-stephens Jul 19, 2026
b8c6b37
feat: add multi-example validation
patrick-stephens Jul 19, 2026
fb03366
fix: additional failures in tail examples
patrick-stephens Jul 19, 2026
c5fa192
fix: incorrect elasticsearch output name used in routing
patrick-stephens Jul 19, 2026
988fe3a
fix: resolve routing examples
patrick-stephens Jul 19, 2026
d58da9f
fix: resolve loki examples
patrick-stephens Jul 19, 2026
e3e9faf
feat: remove common leading indentation to prevent spurious failures …
patrick-stephens Jul 19, 2026
56630f1
feat: support configurable image
patrick-stephens Jul 19, 2026
ef5f2fc
fix: resolve sql indentiation issue
patrick-stephens Jul 19, 2026
05b8b5d
fix: resolve missing AVRO support in release FB for Kafka
patrick-stephens Jul 19, 2026
7d51e3b
fix: resolve s3 examples
patrick-stephens Jul 19, 2026
cab9c94
fix: resolve lua in kafka examples
patrick-stephens Jul 19, 2026
d5268dc
fix: resolve quoting for blob input
patrick-stephens Jul 19, 2026
8d1ea3b
fix: resolve examples for K8S filter
patrick-stephens Jul 19, 2026
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
69 changes: 69 additions & 0 deletions .github/workflows/pr-example-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Validate example configurations in PRs

on:
pull_request:
paths:
- '**/*.md'

permissions: {}

# Avoid multiple commits on the same PR racing to update the comment.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
validate-configs:
name: Validate example configurations in changed Markdown files
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: Get changed Markdown files
# We do not use the usual changed files action because of previous security issues.
id: changed_files
# This complex command finds files changed in the PR, filtering for `.md` and also ensuring they are in the `docs` directory.
# It ensures we only process files that are part of the PR and match our pattern.
# Note: The `github.event.pull_request.base.sha` is used to get the base commit of the PR, which is important for accurate diffing.
#
# On pull requests, HEAD refers to the merge commit.
# We want to compare against the base of the PR.
# Use git diff-tree to get files changed between the PR base and the current commit.
# --name-only lists only the names of the files.
# --diff-filter=AMCR will only show Added, Modified, Copied, Renamed files.
# We grep for *.md files you are interested in.
# The 'docs/' prefix is a common convention but adjust as necessary.
run: |
changed_md=$(git diff-tree --no-commit-id --name-only --diff-filter=AMCR ${{ github.event.pull_request.base.sha }}...HEAD | grep './.*\.md$' || true)
echo "Changed Markdown files: $changed_md"
echo "list=${changed_md}" >> $GITHUB_OUTPUT
shell: bash

- name: Validate example configurations provided in any changed files
run: |
if [ -z "${CHANGED_MD_FILES:-}" ]; then
echo "No Markdown files changed in this PR. Skipping validation."
exit 0
fi

error_count=0

# Loop through each changed file
for FILE in $CHANGED_MD_FILES; do
echo "Processing changed file: $FILE"
./scripts/test-config.sh "$FILE" || error_count=$((error_count + 1))
done

if [ $error_count -ne 0 ]; then
echo "ERROR: Validation failed for $error_count file(s)."
exit 1
fi
shell: bash
env:
CHANGED_MD_FILES: ${{ steps.changed_files.outputs.list }}
4 changes: 2 additions & 2 deletions installation/downloads/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ docker run -ti cr.fluentbit.io/fluent/fluent-bit
Use the following command to start Fluent Bit while using a configuration file:

{% tabs %}
{% tab title="fluent-bit.conf" %}
{% tab title="Legacy Configuration: fluent-bit.conf" %}

```shell
docker run -ti -v ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf \
Expand All @@ -24,7 +24,7 @@ docker run -ti -v ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf \

{% endtab %}

{% tab title="fluent-bit.yaml" %}
{% tab title="YAML configuration: fluent-bit.yaml" %}

```shell
docker run -ti -v ./fluent-bit.yaml:/fluent-bit/etc/fluent-bit.yaml \
Expand Down
6 changes: 4 additions & 2 deletions pipeline/buffering.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ pipeline:
# Inherits storage.type: filesystem from service

- name: mem
storage.type: memory # Overrides the inherited default
# Overrides the inherited default
storage.type: memory
```

{% endtab %}
Expand All @@ -124,7 +125,8 @@ pipeline:

[INPUT]
Name mem
Storage.Type memory # Overrides the inherited default
# Overrides the inherited default
Storage.Type memory
```

{% endtab %}
Expand Down
2 changes: 1 addition & 1 deletion pipeline/filters/geoip2-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following configuration processes the incoming `remote_addr` and appends cou
pipeline:
inputs:
- name: dummy
dummy: {"remote_addr": "8.8.8.8"}
dummy: '{"remote_addr": "8.8.8.8"}'

filters:
- name: geoip2
Expand Down
11 changes: 6 additions & 5 deletions pipeline/filters/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,11 @@ pipeline:
{% tab title="fluent-bit.conf" %}

```text
[PARSER]
Name custom-tag
Format regex
Regex ^(?<namespace_name>[^_]+)\.(?<pod_name>[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)\.(?<container_name>.+)\.(?<container_id>[a-z0-9]{64})
# Ensure this is added to parsers_file loaded in the SERVICE section
# [PARSER]
# Name custom-tag
# Format regex
# Regex ^(?<namespace_name>[^_]+)\.(?<pod_name>[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)\.(?<container_name>.+)\.(?<container_id>[a-z0-9]{64})
[INPUT]
Name tail
Expand Down Expand Up @@ -488,7 +489,7 @@ pipeline:
parser: docker
docker_mode: on
mem_buf_limit: 50MB
skip_login_lines: on
skip_long_lines: on
refresh_interval: 10
filters:
Expand Down
4 changes: 2 additions & 2 deletions pipeline/filters/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The plugin needs a parser file which defines how to parse each field.
This is an example of parsing a record `{"data":"100 0.5 true This is example"}`.

{% tabs %}
{% tab title="fluent-bit.yaml" %}
{% tab title="parser.yaml" %}

```yaml
parsers:
Expand All @@ -37,7 +37,7 @@ parsers:
```

{% endtab %}
{% tab title="fluent-bit.conf" %}
{% tab title="parser.conf" %}

```text
[PARSER]
Expand Down
4 changes: 2 additions & 2 deletions pipeline/inputs/blob.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ This example excludes certain file patterns and uses filesystem storage for bett
pipeline:
inputs:
- name: blob
path: /data/artifacts/**/*
exclude_pattern: *.tmp,*.bak,*.old
path: '/data/artifacts/**/*'
exclude_pattern: '*.tmp,*.bak,*.old'
storage.type: filesystem
storage.pause_on_chunks_overlimit: true
mem_buf_limit: 50M
Expand Down
2 changes: 1 addition & 1 deletion pipeline/inputs/cpu-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pipeline:
{% endtab %}
{% tab title="fluent-bit.conf" %}

```shell
```text
[INPUT]
Name cpu
Tag my_cpu
Expand Down
25 changes: 22 additions & 3 deletions pipeline/inputs/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,16 @@ pipeline:
filters:
- name: lua
match: '*'
script: kafka.lua
call: modify_kafka_message
code: |
local count = 0
function modify_kafka_message(tag, timestamp, record)
count = count + 1
local payload = record.payload
payload.topic = record.topic
payload.status = 'processed by fluent-bit, total records: '..tostring(count)
return 1, timestamp, payload
end

outputs:
- name: kafka
Expand All @@ -118,8 +126,8 @@ pipeline:
[FILTER]
Name lua
Match *
Script kafka.lua
Call modify_kafka_message
Code local count = 0 function modify_kafka_message(tag, timestamp, record) count = count + 1 local payload = record.payload payload.topic = record.topic payload.status = 'processed by fluent-bit, total records: '..tostring(count) return 1, timestamp, payload end

[OUTPUT]
Name kafka
Expand All @@ -134,7 +142,18 @@ The previous example will connect to the broker listening on `kafka-broker:9092`

Since the payload will be in JSON format, the plugin is configured to parse the payload with `format json`.

Every message received is then processed with `kafka.lua` and sent back to the `fb-sink` topic of the same broker.
Every message received is then processed with `kafka.lua` and sent back to the `fb-sink` topic of the same broker, this is shown inline for each configuration but is as follows:

```lua
local count = 0
function modify_kafka_message(tag, timestamp, record)
count = count + 1
local payload = record.payload
payload.topic = record.topic
payload.status = 'processed by fluent-bit, total records: '..tostring(count)
return 1, timestamp, payload
end
```

The example can be executed locally with `make start` in the `examples/kafka_filter` directory (`docker/compose` is used).

Expand Down
18 changes: 9 additions & 9 deletions pipeline/inputs/tail.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ pipeline:
path: /var/log/syslog

outputs:
- stdout:
match: *
- name: stdout
match: '*'
```

{% endtab %}
Expand Down Expand Up @@ -368,13 +368,13 @@ pipeline:
{% tab title="fluent-bit.conf" %}

```text
# Note this is generally added to parsers.conf and referenced in [SERVICE]
[PARSER]
Name multiline
Format regex
Regex /(?<time>[A-Za-z]+ \d+ \d+\:\d+\:\d+)(?<message>.*)/
Time_Key time
Time_Format %b %d %H:%M:%S
# Note this is added to parsers.conf and referenced in [SERVICE]
# [PARSER]
# Name multiline
# Format regex
# Regex /(?<time>[A-Za-z]+ \d+ \d+\:\d+\:\d+)(?<message>.*)/
# Time_Key time
# Time_Format %b %d %H:%M:%S

[INPUT]
Name tail
Expand Down
73 changes: 38 additions & 35 deletions pipeline/outputs/dynatrace.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,45 +33,48 @@ To get started with sending logs to Dynatrace:
{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:

outputs:
- name: http
match: '*'
header:
- 'Content-Type application/json; charset=utf-8'
- 'Authorization Api-Token {your-API-token-here}'
allow_duplicated_headers: false
host: {your-environment-id}.live.dynatrace.com
port: 443
uri: /api/v2/logs/ingest
format: json
json_date_format: iso8601
json_date_key: timestamp
tls: on
tls.verify: on
```
```yaml
pipeline:
inputs:
- name: dummy
tag: test

outputs:
- name: http
match: '*'
header:
- 'Content-Type application/json; charset=utf-8'
- 'Authorization Api-Token {your-API-token-here}'
allow_duplicated_headers: false
host: '{your-environment-id}.live.dynatrace.com'
port: 443
uri: /api/v2/logs/ingest
format: json
json_date_format: iso8601
json_date_key: timestamp
tls: on
tls.verify: on
```

{% endtab %}
{% tab title="fluent-bit.conf" %}

```text
[OUTPUT]
Name http
Match *
Header Content-Type application/json; charset=utf-8
Header Authorization Api-Token {your-API-token-here}
Allow_Duplicated_Headers false
Host {your-environment-id}.live.dynatrace.com
Port 443
Uri /api/v2/logs/ingest
Format json
Json_Date_Format iso8601
Json_Date_Key timestamp
Tls On
Tls.verify On
```
```text
[OUTPUT]
Name http
Match *
Header Content-Type application/json; charset=utf-8
Header Authorization Api-Token {your-API-token-here}
Allow_Duplicated_Headers false
Host {your-environment-id}.live.dynatrace.com
Port 443
Uri /api/v2/logs/ingest
Format json
Json_Date_Format iso8601
Json_Date_Key timestamp
Tls On
Tls.verify On
```

{% endtab %}
{% endtabs %}
Expand Down
14 changes: 0 additions & 14 deletions pipeline/outputs/gelf.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ If you're using Fluent Bit for shipping Kubernetes logs, you can use something l
{% tab title="fluent-bit.yaml" %}

```yaml
parsers:
- name: docker
format: json
time_key: time
time_format: '%Y-%m-%dT%H:%M:%S.%L'
time_keep: off

pipeline:
inputs:
- name: tail
Expand Down Expand Up @@ -142,13 +135,6 @@ pipeline:
Port 12201
Mode tcp
Gelf_Short_Message_Key data

[PARSER]
Name docker
Format json
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep Off
```

{% endtab %}
Expand Down
Loading
Loading