diff --git a/pipeline/inputs/tail.md b/pipeline/inputs/tail.md index 0a137fb6e..9d56320b7 100644 --- a/pipeline/inputs/tail.md +++ b/pipeline/inputs/tail.md @@ -22,7 +22,7 @@ The plugin supports the following configuration parameters: | `ignore_older` | Ignores files older than `ignore_older`. Supports `m`, `h`, `d` (minutes, hours, days) syntax. | Read all. | | `skip_long_lines` | When a monitored file reaches its buffer capacity due to a very long line (`buffer_max_size`), the default behavior is to stop monitoring that file. `skip_long_lines` alter that behavior and instruct Fluent Bit to skip long lines and continue processing other lines that fit into the buffer size. | `off` | | `skip_empty_lines` | Skips empty lines in the log file from any further processing or output. | `off` | -| `db` | Specify the database file to keep track of monitored files and offsets. | _none_ | +| `db` | Specify the database file to keep track of monitored files and offsets. Recommended to be unique per plugin. | _none_ | | `db.sync` | Set a default synchronization (I/O) method. This flag affects how the internal SQLite engine do synchronization to disk, for more details about each option see [the SQLite documentation](https://www.sqlite.org/pragma.html#pragma_synchronous). Most scenarios will be fine with `normal` mode. If you need full synchronization after every write operation set `full` mode. `full` has a high I/O performance cost. Values: `extra`, `full`, `normal`, `off`. | `normal` | | `db.locking` | Specify that the database will be accessed only by Fluent Bit. Enabling this feature helps increase performance when accessing the database but restricts externals tool from querying the content. | `false` | | `db.journal_mode` | Sets the journal mode for databases (`wal`). Enabling `wal` provides higher performance. `wal` isn't compatible with shared network file systems. | `wal` | @@ -75,6 +75,8 @@ If no database file is present, positioning behavior depends on the value of `re - When `read_from_head` is `true`, the plugin reads from the beginning of the file. - When `read_from_head` is `false`, the plugin starts monitoring from the end of the file (classic "tail" behavior). This means that only new content written after Fluent Bit starts will be monitored. +The database file essentially stores `inode=offset` so it should be unique per instance of the plugin, for example if you have two tail inputs then use two separate `db` files for each. That way each tail input can independently track its own state. + ## Monitor a large number of files To monitor a large number of files, you can increase the `inotify` settings in your Linux environment by modifying the following `sysctl` parameters: