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: docs/operators/file_input.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The `file_input` operator reads logs from files. It will place the lines read in
19
19
|`start_at`|`end`| At startup, where to start reading logs from the file. Options are `beginning` or `end`|
20
20
|`fingerprint_size`|`1kb`| The number of bytes with which to identify a file. The first bytes in the file are used as the fingerprint. Decreasing this value at any point will cause existing fingerprints to forgotten, meaning that all files will be read from the beginning (one time). |
21
21
|`max_log_size`|`1MiB`| The maximum size of a log entry to read before failing. Protects against reading large amounts of data into memory |
22
-
|`max_concurrent_files`| 1024 | The maximum number of log files from which logs will be read concurrently. If the number of files matched in the `include` pattern exceeds this number, then files will be processed in batches. One batch will be processed per `poll_interval`. |
22
+
|`max_concurrent_files`| 1024 | The maximum number of log files from which logs will be read concurrently (minimum = 2). If the number of files matched in the `include` pattern exceeds half of this number, then files will be processed in batches. One batch will be processed per `poll_interval`. |
23
23
|`labels`| {} | A map of `key: value` labels to add to the entry's labels |
24
24
|`resource`| {} | A map of `key: value` labels to add to the entry's resource |
25
25
@@ -35,6 +35,13 @@ If set, the `multiline` configuration block instructs the `file_input` operator
35
35
The `multiline` configuration block must contain exactly one of `line_start_pattern` or `line_end_pattern`. These are regex patterns that
36
36
match either the beginning of a new log entry, or the end of a log entry.
37
37
38
+
Also refer to [recombine](/docs/operators/recombine.md) operator for merging events with greater control.
39
+
40
+
### File rotation
41
+
42
+
When files are rotated and its new names are no longer captured in `include` pattern (i.e. tailing symlink files), it could result in data loss.
43
+
To avoid the data loss, choose move/create rotation method and set `max_concurrent_files` higher than the twice of the number of files to tail.
0 commit comments