1 | initial version |
There are a few ways to read files in a specific order using filebeat:
- type: log
paths:
- /path/to/file1.log
- /path/to/file2.log
- /path/to/file3.log
exclude_lines
or include_lines
options to filter the files being read based on a specific pattern. For example, if your files are named in a specific order, you can include a pattern that matches that order:- type: log
paths:
- /path/to/files/*.log
include_lines: ['file-01', 'file-02', 'file-03']
harvester
options to control how filebeat reads files. For example, you can set the harvester.backoff
and harvester.max_backoff
options to wait a specific amount of time before reading the next file. This can be useful for ensuring that files are read in a specific order:- type: log
paths:
- /path/to/files/*.log
harvester.backoff: 5s
harvester.max_backoff: 10s