I'm running a K8 cluster on Fargate and using FluentBit to send logs to cloudwatch https://docs.aws.amazon.com/eks/latest/userguide/fargate-logging.html#fargate-logging-troubleshooting
I'm able to send all logs to a cloudwatch group with this configMap
kind: Namespace
apiVersion: v1
metadata:
name: aws-observability
labels:
aws-observability: enabled
---
kind: ConfigMap
apiVersion: v1
metadata:
name: aws-logging
namespace: aws-observability
data:
output.conf: |
[OUTPUT]
Name cloudwatch
Match /var/log/1.log
region us-east-1
log_group_name fluent-bit-cloudwatch
log_stream_prefix from-fluent-bit-
auto_create_group true
Fargate Logging does not support INPUT in fluentBit, only OUTPUT, FILTER, and PARSER
Is it possible to use multiple outputs to send logs from one path to a specific cloudwatch group
something like:
[OUTPUT]
Name cloudwatch
Match /var/log/1.log
region us-east-1
log_group_name fluent-bit-cloudwatch
log_stream_prefix from-fluent-bit-
auto_create_group true
[OUTPUT]
Name cloudwatch
Match /var/log/2.log
region us-east-1
log_group_name fluent-bit-cloudwatch_2
log_stream_prefix from-fluent-bit-
auto_create_group true
Where logs from /var/log/1.log
would go to fluent-bit-cloudwatch cloudwatch group
and logs from /var/log/2.log
would go to fluent-bit-cloudwatch_2 cloudwatch group