@@ -84,9 +84,27 @@ register new records. This can happen with any input source plugin. The goal of
84
84
85
85
For a full data safety guarantee, use filesystem buffering.
86
86
87
- Here is an example input definition:
87
+ Choose your preferred format for an example input definition:
88
+
89
+ {% tabs %}
90
+ {% tab title="fluent-bit.yaml" %}
91
+
92
+ ``` yaml
93
+ pipeline :
94
+ inputs :
95
+ - name : tcp
96
+ listen : 0.0.0.0
97
+ port : 5170
98
+ format : none
99
+ tag : tcp-logs
100
+ mem_buf_limit : 50MB
101
+ ` ` `
102
+
103
+ {% endtab %}
104
+
105
+ {% tab title="fluent-bit.conf" %}
88
106
89
- ``` python
107
+ ` ` ` text
90
108
[INPUT]
91
109
Name tcp
92
110
Listen 0.0.0.0
@@ -96,6 +114,9 @@ Here is an example input definition:
96
114
Mem_Buf_Limit 50MB
97
115
```
98
116
117
+ {% endtab %}
118
+ {% endtabs %}
119
+
99
120
If this input uses more than 50  ; MB memory to buffer logs, you will get a warning like
100
121
this in the Fluent Bit logs:
101
122
@@ -207,7 +228,25 @@ The Service section refers to the section defined in the main
207
228
208
229
A Service section will look like this:
209
230
210
- ``` python
231
+ {% tabs %}
232
+ {% tab title="fluent-bit.yaml" %}
233
+
234
+ ``` yaml
235
+ service :
236
+ flush : 1
237
+ log_level : info
238
+ storage.path : /var/log/flb-storage/
239
+ storage.sync : normal
240
+ storage.checksum : off
241
+ storage.backlog.mem_limit : 5M
242
+ storage.backlog.flush_on_shutdown : off
243
+ ` ` `
244
+
245
+ {% endtab %}
246
+
247
+ {% tab title="fluent-bit.conf" %}
248
+
249
+ ` ` ` text
211
250
[SERVICE]
212
251
flush 1
213
252
log_Level info
@@ -218,6 +257,9 @@ A Service section will look like this:
218
257
storage.backlog.flush_on_shutdown off
219
258
```
220
259
260
+ {% endtab %}
261
+ {% endtabs %}
262
+
221
263
This configuration sets an optional buffering mechanism where the route to the data
222
264
is ` /var/log/flb-storage/ ` . It uses ` normal ` synchronization mode, without
223
265
running a checksum and up to a maximum of 5  ; MB of memory when processing backlog data.
@@ -236,7 +278,33 @@ The following example configures a service offering filesystem buffering
236
278
capabilities and two input plugins being the first based in filesystem and the second
237
279
with memory only.
238
280
239
- ``` python
281
+ {% tabs %}
282
+ {% tab title="fluent-bit.yaml" %}
283
+
284
+ ``` yaml
285
+ service :
286
+ flush : 1
287
+ log_level : info
288
+ storage.path : /var/log/flb-storage/
289
+ storage.sync : normal
290
+ storage.checksum : off
291
+ storage.max_chunks_up : 128
292
+ storage.backlog.mem_limit : 5M
293
+
294
+ pipeline :
295
+ inputs :
296
+ - name : cpu
297
+ storage.type : filesystem
298
+
299
+ - name : mem
300
+ storage.type : memory
301
+ ` ` `
302
+
303
+ {% endtab %}
304
+
305
+ {% tab title="fluent-bit.conf" %}
306
+
307
+ ` ` ` text
240
308
[SERVICE]
241
309
flush 1
242
310
log_Level info
@@ -255,6 +323,9 @@ with memory only.
255
323
storage.type memory
256
324
```
257
325
326
+ {% endtab %}
327
+ {% endtabs %}
328
+
258
329
### Output Section Configuration
259
330
260
331
If certain chunks are filesystem ` storage.type ` based, it's possible to control the
@@ -269,7 +340,35 @@ The following example creates records with CPU usage samples in the filesystem w
269
340
are delivered to Google Stackdriver service while limiting the logical queue
270
341
(buffering) to ` 5M ` :
271
342
272
- ``` python
343
+ {% tabs %}
344
+ {% tab title="fluent-bit.yaml" %}
345
+
346
+ ``` yaml
347
+ service :
348
+ flush : 1
349
+ log_level : info
350
+ storage.path : /var/log/flb-storage/
351
+ storage.sync : normal
352
+ storage.checksum : off
353
+ storage.max_chunks_up : 128
354
+ storage.backlog.mem_limit : 5M
355
+
356
+ pipeline :
357
+ inputs :
358
+ - name : cpu
359
+ storage.type : filesystem
360
+
361
+ outputs :
362
+ - name : stackdriver
363
+ match : ' *'
364
+ storage.total_limit_size : 5M
365
+ ` ` `
366
+
367
+ {% endtab %}
368
+
369
+ {% tab title="fluent-bit.conf" %}
370
+
371
+ ` ` ` text
273
372
[SERVICE]
274
373
flush 1
275
374
log_Level info
@@ -289,5 +388,8 @@ are delivered to Google Stackdriver service while limiting the logical queue
289
388
storage.total_limit_size 5M
290
389
```
291
390
391
+ {% endtab %}
392
+ {% endtabs %}
393
+
292
394
If Fluent Bit is offline because of a network issue, it will continue buffering CPU
293
- samples, keeping a maximum of 5  ; MB of the newest data.
395
+ samples, keeping a maximum of 5  ; MB of the newest data.
0 commit comments