I have log folders which contains different type of log files in it.
My use case:
I want to upload log files to an S3 bucket using fluent-bit, ensuring that each log file is saved with its original filename.
Problem:
All the logs are being consolidated into a single file instead of being separated into individual files in the S3 bucket.
Here is my fluent-bit.conf file. Please suggest some changes to achieve the desired output.
[INPUT]
Name tail
Path /mnt/Server_Logs/*.log
Read_from_Head true
Path_Key filename
Refresh_Interval 5
Tag *.logs
[OUTPUT]
Name s3
Match *.logs
region ap-south-1
use_put_object On
total_file_size 10M
upload_timeout 10m
preserve_data_ordering true
store_dir /tmp/fluent-bit/s3
bucket bitbucket
static_file_path On
s3_key_format /fluent-bit-logs/$TAG/$filename
Also suggest some improvements in this file if any.
Sahib is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3