You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pipeline/inputs/tail.md
+91Lines changed: 91 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ The plugin supports the following configuration parameters:
38
38
|`file_cache_advise`| Set the `posix_fadvise` in `POSIX_FADV_DONTNEED` mode. This reduces the usage of the kernel file cache. This option is ignored if not running on Linux. |`on`|
39
39
|`threaded`| Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). |`false`|
40
40
|`Unicode.Encoding`| Set the Unicode character encoding of the file data. This parameter requests two-byte aligned chunk and buffer sizes. If data is not aligned for two bytes, Fluent Bit will use two-byte alignment automatically to avoid character breakages on consuming boundaries. Supported values: `UTF-16LE`, `UTF-16BE`, and `auto`. |`none`|
41
+
|`Generic.Encoding`| Set the non-Unicode encoding of the file data. Supported values: `ShiftJIS`, `UHC`, `GBK`, `GB18030`, `Big5`, `Win866`, `Win874`, `Win1250`, `Win1251`, `Win1252`, `Win2513`, `Win1254`, `Win1255`, and `Win1256`. |`none`|
41
42
42
43
## Buffers and memory management
43
44
@@ -84,6 +85,13 @@ The `Unicode.Encoding` parameter is dependent on the simdutf library, which is i
84
85
Additionally, the `auto` setting for `Unicode.Encoding` isn't supported in all cases, and can make mistakes when it tries to guess the correct encoding. For best results, use either the `UTF-16LE` or `UTF-16BE` setting if you know the encoding type of the target file.
85
86
{% endhint %}
86
87
88
+
{% hint style="info" %}
89
+
The `Unicode.Encoding` parameter is dependent on the simdutf library, which is itself dependent on C++ version 11 or later. In environments that use earlier versions of C++, the `Unicode.Encoding` parameter will fail.
90
+
91
+
Additionally, the `auto` setting for `Unicode.Encoding` isn't supported in all cases, and can make mistakes when it tries to guess the correct encoding. For best results, use either the `UTF-16LE` or `UTF-16BE` setting if you know the encoding type of the target file.
92
+
{% endhint %}
93
+
94
+
87
95
## Monitor a large number of files
88
96
89
97
To monitor a large number of files, you can increase the `inotify` settings in your Linux environment by modifying the following `sysctl` parameters:
@@ -464,3 +472,86 @@ While file rotation is handled, there are risks of potential log loss when using
464
472
- Final note: the `Path` patterns can't match the rotated files. Otherwise, the rotated file would be read again and lead to duplicate records.
465
473
466
474
{% endhint %}
475
+
476
+
## Character Encoding Conversion
477
+
478
+
This feature allows Fluent Bit to convert logs from various character encodings into the standard UTF-8 format.
479
+
This is crucial for processing logs from systems, especially Windows, that use legacy or non-UTF-8 encodings.
480
+
Proper conversion ensures that your log data is correctly parsed, indexed, and searchable.
481
+
482
+
### When to Use This Feature
483
+
484
+
You should use this feature if your log files or messages are not in UTF-8 and you are seeing garbled or incorrectly rendered characters.
485
+
This is common in environments that use:
486
+
487
+
* Modern Windows applications that log in UTF-16.
488
+
489
+
* Legacy Windows systems with applications that use traditional code pages (e.g., ShiftJIS, GBK, Win1252).
490
+
491
+
### Configuration Parameters
492
+
493
+
To enable encoding conversion, you will use one of the following two parameters within an input plugin configuration.
494
+
495
+
1.`Unicode.Encoding`
496
+
497
+
Use this parameter for high-performance conversion of UTF-16 encoded logs to UTF-8. This method utilizes modern processor features (SIMD instructions) to accelerate the conversion process, making it highly efficient.
498
+
499
+
* Use Case: Ideal for logs coming from modern Windows environments that default to UTF-16.
500
+
* Supported Values:
501
+
* UTF-16LE (Little-Endian)
502
+
* UTF-16BE (Big-Endian)
503
+
504
+
2.`Generic.Encoding`
505
+
506
+
Use this parameter to convert from a wide variety of other character encodings, particularly legacy Windows code pages.
507
+
508
+
* Use Case: Essential for logs from older systems or applications configured for specific regions, common in East Asia and Eastern Europe.
509
+
* Supported Values: You can use any of the names or aliases listed below.
0 commit comments