Fluent Bit Output CloudWatch Loggroup 설정 방법

2024. 12. 24. 13:28기타/Fluent Bit

728x90
SMALL
  • 개요
Fluent Bit Output Cloudwatch Loggroup을 Output으로 사용할 때 kubernetes metadata를 통해 namespace와 pod, container name 사용 하는 방법

 

 

  • 설정
[OUTPUT]
    Name cloudwatch_logs
    Match   *
    region us-east-1
    log_group_name fallback-group
    log_stream_prefix fallback-stream
    auto_create_group On
    log_group_template application-logs-$kubernetes['host'].$kubernetes['namespace_name']
    log_stream_template $kubernetes['pod_name'].$kubernetes['container_name']

With the above kubernetes metadata, the log group name will be
application-logs-ip-10-1-128-166.us-east-2.compute.internal.my-namespace.
And the log stream name will be myapp-5468c5d4d7-n2swr.myapp.

 

 

  • 참고
https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch
728x90
LIST