@INCLUDE {{{managed.temporaryFiles.ecs_metadata}}} [INPUT] # Listen for Application Logs on an Unused Port. Avoid Parsing Json for Performance. Name tcp Tag ApplicationLogs Listen 0.0.0.0 Port 5170 Format none Chunk_Size 64 Buffer_Size 1024 Mem_Buf_Limit 100MB storage.type filesystem Alias ApplicationLogsTCP [INPUT] # Listen for Request Logs on an Unused Port. Avoid Parsing Json for Performance. Name tcp Tag RequestLogs Listen 0.0.0.0 Port 5171 Format none Chunk_Size 64 Buffer_Size 1024 Mem_Buf_Limit 256MB storage.type filesystem Alias RequestLogsTCP [INPUT] # Listen for EMF Metric Logs on an Unused Port. Name tcp Tag EMFLogs Listen 0.0.0.0 Port 25888 Format none Chunk_Size 32 Buffer_Size 64 Mem_Buf_Limit 100MB storage.type filesystem Alias EMFLogsTCP # Add hostname to metrics to identify them [FILTER] Name record_modifier Match * Record taskId ${ECS_TASK_ID} [OUTPUT] # Send any EMF Logs to A CloudWatch Logs Group Name cloudwatch_logs Match EMFLogs region ${LOG_REGION} log_group_name XYZ-${REGION}-${STAGE}-EMFLogs log_stream_prefix ${ECS_TASK_ID}/ log_key log auto_create_group true retry_limit 3 log_format json/emf Alias EMFLogsCWL # Send the metrics as CW Logs # The CW Metrics filter on the log group will turn them into metrics # Use hostname in logs to differentiate log streams per task in Fargate # Alternative is to use: https://github.com/aws/amazon-cloudwatch-logs-for-fluent-bit#templating-log-group-and-stream-names [OUTPUT] Name cloudwatch_logs Match fb_metrics* region ${LOG_REGION} log_group_name XYZ-${REGION}-${STAGE}-FluentBitMetrics log_stream_name ${ECS_TASK_ID}/ auto_create_group On retry_limit 3 Alias FBCWL