Skip to content

Commit 3c40e88

Browse files
committed
Update documnetation comments
Signed-off-by: Bogdan Drutu <[email protected]>
1 parent 4ce07eb commit 3c40e88

File tree

3 files changed

+38
-37
lines changed

3 files changed

+38
-37
lines changed

pkg/stanza/docs/operators/file_input.md

+30-29
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,36 @@ The `file_input` operator reads logs from files. It will place the lines read in
44

55
### Configuration Fields
66

7-
| Field | Default | Description |
8-
|---------------------------------| --- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9-
| `id` | `file_input` | A unique identifier for the operator. |
10-
| `output` | Next in pipeline | The connected operator(s) that will receive all outbound entries. |
11-
| `include` | required | A list of file glob patterns that match the file paths to be read. |
12-
| `exclude` | [] | A list of file glob patterns to exclude from reading. |
13-
| `poll_interval` | 200ms | The duration between filesystem polls. |
14-
| `multiline` | | A `multiline` configuration block. See below for details. |
15-
| `force_flush_period` | `500ms` | Time since last read of data from file, after which currently buffered log should be send to pipeline. Takes `time.Time` as value. Zero means waiting for new data forever. |
16-
| `encoding` | `utf-8` | The encoding of the file being read. See the list of supported encodings below for available options. |
17-
| `include_file_name` | `true` | Whether to add the file name as the attribute `log.file.name`. |
18-
| `include_file_path` | `false` | Whether to add the file path as the attribute `log.file.path`. |
19-
| `include_file_name_resolved` | `false` | Whether to add the file name after symlinks resolution as the attribute `log.file.name_resolved`. |
20-
| `include_file_path_resolved` | `false` | Whether to add the file path after symlinks resolution as the attribute `log.file.path_resolved`. |
21-
| `include_file_owner_name` | `false` | Whether to add the file owner name as the attribute `log.file.owner.name`. Not supported for windows. |
22-
| `include_file_owner_group_name` | `false` | Whether to add the file group name as the attribute `log.file.owner.group.name`. Not supported for windows. |
23-
| `include_file_record_number` | `false` | Whether to add the record's record number in the file as the attribute `log.file.record_number`. |
24-
| `preserve_leading_whitespaces` | `false` | Whether to preserve leading whitespaces. |
25-
| `preserve_trailing_whitespaces` | `false` | Whether to preserve trailing whitespaces. |
26-
| `start_at` | `end` | At startup, where to start reading logs from the file. Options are `beginning` or `end`. This setting will be ignored if previously read file offsets are retrieved from a persistence mechanism. |
27-
| `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). |
28-
| `max_log_size` | `1MiB` | The maximum size of a log entry to read before failing. Protects against reading large amounts of data into memory |.
29-
| `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. |
30-
| `max_batches` | 0 | Only applicable when files must be batched in order to respect `max_concurrent_files`. This value limits the number of batches that will be processed during a single poll interval. A value of 0 indicates no limit. |
31-
| `delete_after_read` | `false` | If `true`, each log file will be read and then immediately deleted. Requires that the `filelog.allowFileDeletion` feature gate is enabled. |
32-
| `acquire_fs_lock` | `false` | Whether to attempt to acquire a filesystem lock before reading a file (Unix only). |
33-
| `attributes` | {} | A map of `key: value` pairs to add to the entry's attributes. |
34-
| `resource` | {} | A map of `key: value` pairs to add to the entry's resource. |
35-
| `header` | nil | Specifies options for parsing header metadata. Requires that the `filelog.allowHeaderMetadataParsing` feature gate is enabled. See below for details. |
7+
| Field | Default | Description |
8+
|---------------------------------|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9+
| `id` | `file_input` | A unique identifier for the operator. |
10+
| `output` | Next in pipeline | The connected operator(s) that will receive all outbound entries. |
11+
| `include` | required | A list of file glob patterns that match the file paths to be read. |
12+
| `exclude` | [] | A list of file glob patterns to exclude from reading. |
13+
| `poll_interval` | 200ms | The duration between filesystem polls. |
14+
| `multiline` | | A `multiline` configuration block. See below for details. |
15+
| `force_flush_period` | `500ms` | Time since last read of data from file, after which currently buffered log should be send to pipeline. Takes `time.Time` as value. Zero means waiting for new data forever. |
16+
| `encoding` | `utf-8` | The encoding of the file being read. See the list of supported encodings below for available options. |
17+
| `include_file_name` | `true` | Whether to add the file name as the attribute `log.file.name`. |
18+
| `include_file_path` | `false` | Whether to add the file path as the attribute `log.file.path`. |
19+
| `include_file_name_resolved` | `false` | Whether to add the file name after symlinks resolution as the attribute `log.file.name_resolved`. |
20+
| `include_file_path_resolved` | `false` | Whether to add the file path after symlinks resolution as the attribute `log.file.path_resolved`. |
21+
| `include_file_owner_name` | `false` | Whether to add the file owner name as the attribute `log.file.owner.name`. Not supported for windows. |
22+
| `include_file_owner_group_name` | `false` | Whether to add the file group name as the attribute `log.file.owner.group.name`. Not supported for windows. |
23+
| `include_file_record_number` | `false` | Whether to add the record's record number in the file as the attribute `log.file.record_number`. |
24+
| `preserve_leading_whitespaces` | `false` | Whether to preserve leading whitespaces. |
25+
| `preserve_trailing_whitespaces` | `false` | Whether to preserve trailing whitespaces. |
26+
| `start_at` | `end` | At startup, where to start reading logs from the file. Options are `beginning` or `end`. This setting will be ignored if previously read file offsets are retrieved from a persistence mechanism. |
27+
| `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). |
28+
| `initial_buffer_size` | `16KiB` | The initial size of the to read buffer for headers and logs, the buffer will be grown as necessary. Larger values may lead to unnecessary large buffer allocations, and smaller values may lead to lots of copies while growing the buffer. |
29+
| `max_log_size` | `1MiB` | The maximum size of a log entry to read before failing. Protects against reading large amounts of data into memory. |
30+
| `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. |
31+
| `max_batches` | 0 | Only applicable when files must be batched in order to respect `max_concurrent_files`. This value limits the number of batches that will be processed during a single poll interval. A value of 0 indicates no limit. |
32+
| `delete_after_read` | `false` | If `true`, each log file will be read and then immediately deleted. Requires that the `filelog.allowFileDeletion` feature gate is enabled. |
33+
| `acquire_fs_lock` | `false` | Whether to attempt to acquire a filesystem lock before reading a file (Unix only). |
34+
| `attributes` | {} | A map of `key: value` pairs to add to the entry's attributes. |
35+
| `resource` | {} | A map of `key: value` pairs to add to the entry's resource. |
36+
| `header` | nil | Specifies options for parsing header metadata. Requires that the `filelog.allowHeaderMetadataParsing` feature gate is enabled. See below for details. |
3637
| `header.pattern` | required for header metadata parsing | A regex that matches every header line. |
3738
| `header.metadata_operators` | required for header metadata parsing | A list of operators used to parse metadata from the header. |
3839

0 commit comments

Comments
 (0)