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
+40-2Lines changed: 40 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,45 @@ The plugin supports the following configuration parameters:
38
38
| File\_Cache\_Advise | Set the posix_fadvise in POSIX_FADV_DONTNEED mode. This will reduce 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
41
-
Note that if the database parameter `DB` is **not** specified, by default the plugin will start reading each target file from the beginning. This also might cause some unwanted behavior, for example when a line is bigger that `Buffer_Chunk_Size` and `Skip_Long_Lines` is not turned on, the file will be read from the beginning of each `Refresh_Interval` until the file is rotated.
41
+
{% hint style="info" %}
42
+
If the database parameter `DB` is **not** specified, by default the plugin reads each target file from the beginning. This also might cause some unwanted behavior. For example, when a line is bigger than `Buffer_Chunk_Size` and `Skip_Long_Lines` is not turned on, the file will be read from the beginning of each `Refresh_Interval` until the file is rotated.
43
+
{% endhint %}
44
+
45
+
## Monitor a large number of files
46
+
47
+
To monitor a large number of files, you can increase the inotify settings in your Linux environment by modifying the following sysctl parameters:
48
+
49
+
```text
50
+
sysctl fs.inotify.max_user_watches=LIMIT1
51
+
sysctl fs.inotify.max_user_instances=LIMIT2
52
+
```
53
+
54
+
Replace _`LIMIT1`_ and _`LIMIT2`_ with the integer values of your choosing. Higher values raise your inotify limit accordingly.
55
+
56
+
However, these changes revert upon reboot unless you write them to the appropriate `inotify.conf` file, in which case they will persist across reboots. The specific name of this file might vary depending on how you built and installed Fluent Bit. For example, to write changes to a file named `fluent-bit_fs_inotify.conf`, run the following commands:
Replace _`LIMIT1`_ and _`LIMIT2`_ with the integer values of your choosing.
65
+
66
+
You can also provide a custom systemd configuration file that overrides the default systemd settings for Fluent Bit. This override file must be located at `/etc/systemd/system/fluent-bit.service.d/override.conf`. For example, you can add this snippet to your override file to raise the number of files that the Tail plugin can monitor:
67
+
68
+
```text
69
+
[Service]
70
+
LimitNOFILE=LIMIT
71
+
```
72
+
73
+
Replace _`LIMIT`_ with the integer value of your choosing.
74
+
75
+
If you don't already have an override file, you can use the following command to create one in the correct directory:
76
+
77
+
```shell copy
78
+
systemctl edit fluent-bit.service
79
+
```
42
80
43
81
## Multiline Support
44
82
@@ -341,4 +379,4 @@ The `WAL` mechanism give us higher performance but also might increase the memor
341
379
342
380
File rotation is properly handled, including logrotate's _copytruncate_ mode.
343
381
344
-
Note that the `Path` patterns **cannot** match the rotated files. Otherwise, the rotated file would be read again and lead to duplicate records.
382
+
Note that the `Path` patterns **cannot** match the rotated files. Otherwise, the rotated file would be read again and lead to duplicate records.
0 commit comments