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
+84Lines changed: 84 additions & 0 deletions
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 encoding which the origin of character encoding. Currently, ShiftJIS, UHC, GBK, GB18030, Big5, Win866, Win874, Win1250, Win1251, Win1252, Win2513, Win1254, Win1255, Win1256 are supported. |_none_|
41
42
42
43
{% hint style="info" %}
43
44
If the database parameter `DB` isn't specified, by default the plugin reads each target file from the beginning. This might cause unwanted behavior. For example, when a line is bigger than `Buffer_Chunk_Size` and `Skip_Long_Lines` isn't turned on, the file will be read from the beginning of each `Refresh_Interval` until the file is rotated.
@@ -429,3 +430,86 @@ While file rotation is handled, there are risks of potential log loss when using
429
430
- Final note: the `Path` patterns can't match the rotated files. Otherwise, the rotated file would be read again and lead to duplicate records.
430
431
431
432
{% endhint %}
433
+
434
+
## Character Encoding Conversion
435
+
436
+
This feature allows Fluent Bit to convert logs from various character encodings into the standard UTF-8 format.
437
+
This is crucial for processing logs from systems, especially Windows, that use legacy or non-UTF-8 encodings.
438
+
Proper conversion ensures that your log data is correctly parsed, indexed, and searchable.
439
+
440
+
### When to Use This Feature
441
+
442
+
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.
443
+
This is common in environments that use:
444
+
445
+
* Modern Windows applications that log in UTF-16.
446
+
447
+
* Legacy Windows systems with applications that use traditional code pages (e.g., ShiftJIS, GBK, Win1252).
448
+
449
+
### Configuration Parameters
450
+
451
+
To enable encoding conversion, you will use one of the following two parameters within an input plugin configuration.
452
+
453
+
1.`Unicode.Encoding`
454
+
455
+
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.
456
+
457
+
* Use Case: Ideal for logs coming from modern Windows environments that default to UTF-16.
458
+
* Supported Values:
459
+
* UTF-16LE (Little-Endian)
460
+
* UTF-16BE (Big-Endian)
461
+
462
+
2.`Generic.Encoding`
463
+
464
+
Use this parameter to convert from a wide variety of other character encodings, particularly legacy Windows code pages.
465
+
466
+
* Use Case: Essential for logs from older systems or applications configured for specific regions, common in East Asia and Eastern Europe.
467
+
* Supported Values: You can use any of the names or aliases listed below.
0 commit comments