FLuentbit output S3 issue
# general
s
FLuentbit output S3 issue
Copy code
# S3 Output for traefik-v2 logs only
    [OUTPUT]
        Name                       s3
        Match                      traefik.*
        bucket                     mys3-fluentbit
        region                     ap-south-1
        store_dir                  /buffers/s3/
        store_dir_limit_size       5G
        total_file_size            50M
        upload_timeout             5m
        compression                gzip
        use_put_object             Off
        s3_key_format              /ny-s3-s3-shipper/cluster=${CLUSTER_NAME}/app=traefik/date=%Y-%m-%d/traefik-%H-%M-%S-$UUID.gz
        retry_limit                10
        preserve_data_ordering     On
Why is this configuration creating multiple small files of around 200–300 KB? When we add
upload_chunk_size 100M
and set
total_file_size 200M
, the file size increases to around 5–10 MB. @Pat
if we mention it 50M then per file should be 50 MB
p
I think S3 implemented its own internal persistence mechanism if that's what you mean - which files are you talking about, you've not really said? Where are they/etc?
u
@Sagar Chauhan Also, 50MB will be if the file size reaches 50 MB before the upload_timeout. Else, it will upload whatever it accumulated in 5 mins (your upload timeout)
p
yeah makes sense, it's a max size
s
@Sagar Chauhan Also, 50MB will be if the file size reaches 50 MB before the upload_timeout. Else, it will upload whatever it accumulated in 5 mins (your upload timeout)
The issue is that it is not following this approach.
Copy code
[OUTPUT]
        Name                       s3
        Match                      traefik.*
        bucket                     mys3-fluentbit
        region                     ap-south-1
        store_dir                  /buffers/s3/
        store_dir_limit_size       5G
        total_file_size            200M
        upload_timeout             5m
        compression                gzip
        use_put_object             Off
        s3_key_format              /fluentbit-unified-s3-shipper/cluster=${CLUSTER_NAME}/app=traefik/date=%Y-%m-%d/traefik-%H-%M-%S-$UUID.gz
        retry_limit                10
        preserve_data_ordering     On
This is my current S3 output config, and the data it is dumping in S3 is 300K per file and that too very frequent.
See this screenshot.
I suspect that it is due to
use_put_object             Off
, I changed it to On in stage. Let's wait.
Yes, the issue is due to use_put_object being set to Off, @Pat @Ujjwal Sharma.
Ideally, it should work the same way when multipart is enabled. I’m not sure why it’s behaving like that.
after use_put_object: On