We are reading from a file source with @type tail, and specifying a wildcard file pattern. This input tails multiple files but uses a shared pos_file if I'm not mistaken.
<source>
@type tail
@id zeek_json
@label @zeek
tag zeek.*
path /nsm/zeek/logs/current/json_streaming_*.log
pos_file /var/log/td-agent/tmp/zeek_json.pos
<parse>
@type json
</parse>
</source>
The issue I'm encountering is that the log source outputs rotated files that match the path pattern as well, and fluentd also picks up the backup files and reads them as well, resulting in duplicate ingestion of lines in the logs. Every line written to the log is reingested again the number of times that the file is rotated. This is described here:
I would prefer if I didn't have to list every file explicitly for this.
Using fluent-bit isn't an option here as we use an output plugin that is only supported by Fluentd.
- Darren