Skip to content

Commit 5a167b9

Browse files
authored
Merge branch 'master' into lynettemiles/sc-136256/update-fluent-bit-docs-pipeline-outputs-opensear
Signed-off-by: Lynette Miles <[email protected]>
2 parents a6fe4c9 + 6023b6d commit 5a167b9

28 files changed

+924
-966
lines changed

administration/configuring-fluent-bit/yaml/service-section.md

Lines changed: 20 additions & 20 deletions
Large diffs are not rendered by default.

administration/networking.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ plugin issues a retry.
7373

7474
### Listener backlog
7575

76-
When Fluent Bit listens for incoming connections (for example, in input plugins like HTTP, TCP, OpenTelemetry, Forward, Syslog, etc.), the operating system maintains a queue of pending connections. The `net.backlog` option controls the maximum number of pending connections that can be queued before new connection attempts are refused. Increasing this value can help Fluent Bit handle bursts of incoming connections more gracefully. The default value is `128`.
76+
When Fluent Bit listens for incoming connections (for example, in input plugins like HTTP, TCP, OpenTelemetry, Forward, and Syslog), the operating system maintains a queue of pending connections. The `net.backlog` option controls the maximum number of pending connections that can be queued before new connection attempts are refused. Increasing this value can help Fluent Bit handle bursts of incoming connections more gracefully. The default value is `128`.
7777

78-
> **Note:** On Linux, the effective backlog value may be capped by the kernel parameter `net.core.somaxconn`. If you need to allow a higher number of pending connections, you may need to increase this system setting.
78+
{% hint style="info" %}
79+
80+
On Linux, the effective backlog value might be capped by the kernel parameter `net.core.somaxconn`. If you need to allow a greater number of pending connections, you can increase this system setting.
81+
82+
{% endhint %}
7983

8084
## Configuration options
8185

@@ -95,7 +99,7 @@ that rely on networking I/O:
9599
| `net.keepalive_max_recycle` | Set maximum number of times a keepalive connection can be used before it's retired. | `2000` |
96100
| `net.max_worker_connections` | Set maximum number of TCP connections that can be established per worker. | `0` (unlimited) |
97101
| `net.source_address` | Specify network address to bind for data traffic. | _none_ |
98-
| `net.backlog` | Set the maximum number of pending connections for listening sockets. This option is vailable on versions >= 4.0.4. | `128` |
102+
| `net.backlog` | Set the maximum number of pending connections for listening sockets. This option requires Fluent Bit version 4.0.4 or later. | `128` |
99103

100104
## Example
101105

@@ -183,4 +187,4 @@ If the `net.keepalive` option isn't enabled, Fluent Bit closes the TCP connectio
183187
and netcat quits.
184188

185189
After the five records arrive, the connection idles. After 10 seconds, the connection
186-
closes due to `net.keepalive_idle_timeout`.
190+
closes due to `net.keepalive_idle_timeout`.

installation/linux/debian.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Follow the official
3030
[Debian wiki guidance](https://wiki.debian.org/DebianRepository/UseThirdParty#OpenPGP_Key_distribution).
3131

3232
```bash copy
33-
curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg
33+
sudo sh -c 'curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg'
3434
```
3535

3636
### Updated key from March 2022
@@ -61,10 +61,10 @@ which platforms are supported in each release.
6161
## Update your sources lists
6262

6363
For Debian, you must add the Fluent Bit APT server entry to your sources lists.
64-
Add the following content at bottom of your `/etc/apt/sources.list` file.
64+
6565

6666
```bash copy
67-
deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/debian/${CODENAME} ${CODENAME} main
67+
echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/${CODENAME} ${CODENAME} main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
6868
```
6969

7070
Replace _`CODENAME`_ with your specific

installation/linux/raspbian-raspberry-pi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The first step is to add the Fluent Bit server GPG key to your keyring so you
1414
can get FLuent Bit signed packages:
1515

1616
```shell
17-
curl https://packages.fluentbit.io/fluentbit.key | sudo apt-key add -
17+
sudo sh -c 'curl https://packages.fluentbit.io/fluentbit.key | sudo apt-key add - '
1818
```
1919

2020
### Updated key from March 2022
@@ -52,19 +52,19 @@ Add the following content at bottom of your `/etc/apt/sources.list` file.
5252
### Raspbian 12 (Bookworm)
5353

5454
```text
55-
deb https://packages.fluentbit.io/raspbian/bookworm bookworm main
55+
echo "deb https://packages.fluentbit.io/raspbian/bookworm bookworm main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
5656
```
5757

5858
### Raspbian 11 (Bullseye)
5959

6060
```text
61-
deb https://packages.fluentbit.io/raspbian/bullseye bullseye main
61+
echo "deb https://packages.fluentbit.io/raspbian/bullseye bullseye main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
6262
```
6363

6464
### Raspbian 10 (Buster)
6565

6666
```text
67-
deb https://packages.fluentbit.io/raspbian/buster buster main
67+
echo "deb https://packages.fluentbit.io/raspbian/buster buster main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
6868
```
6969

7070
### Update your repositories database

installation/linux/ubuntu.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Follow the official
2525
[Debian wiki guidance](https://wiki.debian.org/DebianRepository/UseThirdParty#OpenPGP_Key_distribution).
2626

2727
```bash
28-
curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg
28+
sudo sh -c 'curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg'
2929
```
3030

3131
### Updated key from March 2022
@@ -56,12 +56,11 @@ which platforms are supported in each release.
5656
## Update your sources lists
5757

5858
On Ubuntu, you need to add the Fluent Bit APT server entry to your sources lists.
59-
Add the following content at bottom of your `/etc/apt/sources.list` file. Ensure
60-
`CODENAME` is set to your specific [Ubuntu release name](https://wiki.ubuntu.com/Releases).
59+
Ensure `CODENAME` is set to your specific [Ubuntu release name](https://wiki.ubuntu.com/Releases).
6160
For example, `focal` for Ubuntu 20.04.
6261

6362
```bash
64-
deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/${CODENAME} ${CODENAME} main
63+
echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/${CODENAME} ${CODENAME} main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
6564
```
6665

6766
### Update your repositories database

pipeline/filters/lua.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ function cb_print(tag, timestamp, record)
9999
end
100100
```
101101

102-
#### Function arguments
102+
### Function arguments
103103

104104
| Name | Description |
105105
| ---- | ----------- |
106106
| `tag` | Name of the tag associated with the incoming record. |
107107
| `timestamp` | Unix timestamp with nanoseconds associated with the incoming record. The original format is a double (`seconds.nanoseconds`). |
108108
| `record` | Lua table with the record content. |
109109

110-
#### Return values
110+
### Return values
111111

112112
Each callback must return three values:
113113

@@ -117,13 +117,13 @@ Each callback must return three values:
117117
| `timestamp` | double | If `code` equals `1`, the original record timestamp will be replaced with this new value. |
118118
| `record` | table | If `code` equals `1`, the original record information will be replaced with this new value. The `record` value must be a valid Lua table. This value can be an array of tables (for example, an array of objects in JSON format), and in that case the input record is effectively split into multiple records. |
119119

120-
## Lua Extended callback with Groups and Metadata support
120+
## Lua extended callback with groups and metadata support
121121

122122
{% hint style="info" %}
123-
This feature is available in Fluent Bit version 4.0.4 and later.
123+
This feature requires Fluent Bit version 4.0.4 or later.
124124
{% endhint %}
125125

126-
For more advanced use cases, especially when working with structured formats like OpenTelemetry Logs, Fluent Bit supports an extended callback prototype that provides access to group metadata and record metadata.
126+
For more advanced use cases, especially when working with structured formats like OpenTelemetry logs, Fluent Bit supports an extended callback prototype that provides access to group metadata and record metadata.
127127

128128
### Extended function signature
129129

@@ -140,8 +140,8 @@ end
140140
| ---- | ----------- |
141141
| `tag` | Name of the tag associated with the incoming record. |
142142
| `timestamp` | Unix timestamp with nanoseconds associated with the incoming record. |
143-
| `group` | A read-only table containing group-level metadata (e.g., OpenTelemetry resource or scope info). This will be an empty table if the log is not part of a group. |
144-
| `metadata` | A table representing the record-specific metadata. You may modify this if needed. |
143+
| `group` | A read-only table containing group-level metadata (for example, OpenTelemetry resource or scope info). This will be an empty table if the log is not part of a group. |
144+
| `metadata` | A table representing the record-specific metadata. You can modify this if needed. |
145145
| `record` | Lua table with the record content. |
146146

147147
#### Extended return values
@@ -159,8 +159,8 @@ Each extended callback must return four values:
159159

160160
At load time, the Lua filter automatically detects which callback prototype to use based on the number of parameters:
161161

162-
- **3 arguments**: Uses the classic mode (`tag`, `timestamp`, `record`)
163-
- **5 arguments**: Uses the metadata-aware mode (`tag`, `timestamp`, `group`, `metadata`, `record`)
162+
- Three arguments: Uses the classic mode (`tag`, `timestamp`, `record`)
163+
- Five arguments: Uses the metadata-aware mode (`tag`, `timestamp`, `group`, `metadata`, `record`)
164164

165165
This ensures backward compatibility with existing Lua scripts.
166166

@@ -182,7 +182,11 @@ function cb_metadata(tag, ts, group, metadata, record)
182182
end
183183
```
184184

185-
> **Note:** The metadata and record arrays must have the same length.
185+
{% hint style="info" %}
186+
187+
The metadata and record arrays must have the same length.
188+
189+
{% endhint %}
186190

187191
### OpenTelemetry example
188192

@@ -262,7 +266,11 @@ pipeline:
262266
}
263267
```
264268

265-
> **Important:** Group metadata is read-only and should not be modified. If you don't need group or metadata support, you can continue using the 3-argument prototype.
269+
{% hint style="info" %}
270+
271+
Group metadata is read-only and should not be modified. If you don't need group or metadata support, you can continue using the three-argument prototype.
272+
273+
{% endhint %}
266274

267275
## Features
268276

@@ -791,4 +799,4 @@ pipeline:
791799

792800
```text
793801
test: [[1731990257.781970977, {}], {"my_env"=>{"A"=>"aaa", "C"=>"ccc", "HOSTNAME"=>"monox-2.lan", "B"=>"bbb"}, "rand_value"=>4805047635809401856}]
794-
```
802+
```

pipeline/inputs/tail.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,38 @@ The plugin supports the following configuration parameters:
4242

4343
The Tail plugin uses buffers to efficiently read and process log files. Understanding how these buffers work helps optimize memory usage and performance.
4444

45-
### File buffers vs Fluent Bit chunks
45+
### File buffers versus Fluent Bit chunks
4646

47-
When a file is opened for monitoring, the Tail plugin allocates a buffer in memory of `buffer_chunk_size` bytes (defaults to 32KB). This buffer is used to read data from the file. If a single record (line) is longer than `buffer_chunk_size`, the buffer will grow up to `buffer_max_size` to accommodate it.
47+
When a file is opened for monitoring, the Tail plugin allocates a buffer in memory of `buffer_chunk_size` bytes (defaults to 32&nbsp;KB). This buffer is used to read data from the file. If a single record (line) is longer than `buffer_chunk_size`, the buffer will grow up to `buffer_max_size` to accommodate it.
4848

49-
> **Note:** These buffers are per-file. If you're monitoring many files, each file gets its own buffer, which can significantly increase memory usage.
49+
{% hint style="info" %}
50+
51+
These buffers are per-file. If you're monitoring many files, each file gets its own buffer, which can significantly increase memory usage.
52+
53+
{% endhint %}
5054

5155
### From buffers to chunks
5256

53-
Inside each file buffer, multiple lines/records might exist. The plugin processes these records and converts them to msgpack format (binary serialization). This msgpack data is then appended to what Fluent Bit calls a **Chunk** - a collection of serialized records that belong to the same tag.
57+
Inside each file buffer, multiple lines or records might exist. The plugin processes these records and converts them to MessagePack format (binary serialization). This MessagePack data is then appended to what Fluent Bit calls a _chunk_, which is a collection of serialized records that belong to the same tag.
5458

55-
While Fluent Bit has a soft limit of 2MB for chunks, input plugins like Tail can generate msgpack buffers larger than 2MB, and the final chunk can exceed this soft limit.
59+
Although Fluent Bit has a soft limit of 2&nbsp;MB for chunks, input plugins like Tail can generate MessagePack buffers larger than 2&nbsp;MB, and the final chunk can exceed this soft limit.
5660

5761
### Memory protection with `mem_buf_limit`
5862

59-
If Fluent Bit is not configured to use filesystem buffering, it needs mechanisms to protect against high memory consumption during backpressure scenarios (e.g., when destination endpoints are down or network issues occur). The `mem_buf_limit` option restricts how much memory in chunks an input plugin can use.
63+
If Fluent Bit is not configured to use filesystem buffering, it needs mechanisms to protect against high memory consumption during backpressure scenarios (for example, when destination endpoints are down or network issues occur). The `mem_buf_limit` option restricts how much memory in chunks an input plugin can use.
6064

6165
When filesystem buffering is enabled, memory management works differently. For more details, see [Buffering and Storage](../../administration/buffering-and-storage.md).
6266

6367
## Database file
6468

65-
{% hint style="info" %}
66-
**File positioning behavior:**
69+
File positioning behavior varies based on the presence or absence of a database file.
6770

68-
- **With database file**: The plugin restores the last known position (offset) from the database. If no previous position exists and `read_from_head` is false, it starts monitoring from the end of the file.
71+
If a database file is present, the plugin restores the last known position (offset) from the database. If no previous position exists and `read_from_head` is `false`, it starts monitoring from the end of the file.
6972

70-
- **Without database file**:
71-
- If `read_from_head` is true: The plugin reads from the beginning of the file
72-
- If `read_from_head` is false: The plugin starts monitoring from the end of the file (classic "tail" behavior)
73+
If no database file is present, positioning behavior depends on the value of `read_from_head`:
7374

74-
This means that without a database and with `read_from_head` set to false, only new content written after Fluent Bit starts will be monitored.
75-
{% endhint %}
75+
- When `read_from_head` is `true`, the plugin reads from the beginning of the file.
76+
- When `read_from_head` is `false`, the plugin starts monitoring from the end of the file (classic "tail" behavior). This means that only new content written after Fluent Bit starts will be monitored.
7677

7778
## Monitor a large number of files
7879

@@ -128,12 +129,12 @@ systemctl edit fluent-bit.service
128129

129130
Fluent Bit 1.8 and later supports multiline core capabilities for the Tail input plugin. Fluent Bit supports the both the old and new configuration mechanisms. To avoid breaking changes, users are encouraged to use the latest one. The two mechanisms are:
130131

131-
- Multiline Core
132-
- Old Multiline
132+
- Multiline core
133+
- Old multiline
133134

134-
### Multiline Core
135+
### Multiline core
135136

136-
The new multiline core is exposed by the following configuration:
137+
Multiline core is exposed by the following configuration:
137138

138139
| Key | Description |
139140
|:-------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------|

0 commit comments

Comments
 (0)