[SERVICE]
    HTTP_Server            On
    HTTP_Listen            0.0.0.0
    HTTP_PORT              2020
    # https://docs.fluentbit.io/manual/administration/monitoring#health-check-for-fluent-bit
    Health_Check           On 
    # customize error and retry thresholds and evaluation period as desired
    HC_Errors_Count        5 
    HC_Retry_Failure_Count 5 
    HC_Period              5
    Parsers_File /fluent-bit/parsers/parsers.conf
    Flush 1
    Grace 30
    
[FILTER]
    Name parser
    Match *
    Key_Name log
    Parser json
    Reserve_Data True

[OUTPUT]
    Name datadog
    Match *
    Host http-intake.logs.us5.datadoghq.com
    TLS on
    compress gzip
    dd_service ${DD_SERVICE}
    dd_source ${DD_SOURCE}
    dd_tags env:${ENV}
    provider ecs
    apikey ${DD_APIKEY}

[OUTPUT]
    Name s3
    Match *
    bucket ${BUCKET}
    region ${AWS_REGION}
    total_file_size 100M
    upload_timeout 5m
    use_put_object On
    compression gzip
    s3_key_format  /ECS/${ECS_CLUSTER}/${DD_SERVICE}/%Y/%m/%d/%H/${ECS_TASK_ID}-$UUID.json.gz
    s3_key_format_tag_delimiters .-