Skip to content

Commit 1eefd3d

Browse files
Merge pull request #1676 from fluent/alexakreizinger/sc-135633/backport-info-from-tail-input-doc-to-oss
2 parents eeeb835 + b8101aa commit 1eefd3d

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

pipeline/inputs/tail.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,45 @@ The plugin supports the following configuration parameters:
3838
| 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 |
3939
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
4040

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:
57+
58+
```shell
59+
mkdir -p /etc/sysctl.d
60+
echo fs.inotify.max_user_watches = LIMIT1 >> /etc/sysctl.d/fluent-bit_fs_inotify.conf
61+
echo fs.inotify.max_user_instances = LIMIT2 >> /etc/sysctl.d/fluent-bit_fs_inotify.conf
62+
```
63+
64+
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+
```
4280

4381
## Multiline Support
4482

@@ -341,4 +379,4 @@ The `WAL` mechanism give us higher performance but also might increase the memor
341379

342380
File rotation is properly handled, including logrotate's _copytruncate_ mode.
343381

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.

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ HashiCorp
8080
hostname
8181
Hostname
8282
Ingester
83+
inotify
8384
Keepalive
8485
Istio
8586
jemalloc
@@ -169,7 +170,7 @@ subrecord
169170
substring
170171
syslog
171172
systemctl
172-
Systemd
173+
systemd
173174
Tanzu
174175
Telegraf
175176
templated

0 commit comments

Comments
 (0)