[BUG] Log Links should work with CloudWatch FluentD Out Of the Box
See original GitHub issueDescribe the bug
As it stands, users wishing to enable CloudWatch logs will need to go through the AWS Process to do so here and then manually modify the fluent-bit-config configmap to alter the generated log stream to match what Flyte expects.
kubectl edit cm -n amazon-cloudwatch fluent-bit-config
[OUTPUT]
Name cloudwatch_logs
Match application.*
region ${AWS_REGION}
log_group_name /aws/containerinsights/${CLUSTER_NAME}/application
log_stream_prefix var.
auto_create_group true
extra_user_agent container-insights
And then use this configmap for flyte:
task_logs.yaml: |
plugins:
logs:
cloudwatch-template-uri: 'https://{vars.region}.console.aws.amazon.com/cloudwatch/home?region={vars.region}#logsV2:log-groups/log-group/$252Faws$252Fcontainerinsights$252F<log group name>$252Fapplication$3FlogStreamNameFilter$3Dvar.application.var.log.containers.{{ .podName }}_{{ .namespace }}_{{ .containerName }}'
We should change the default template defined here to be: https://console.aws.amazon.com/cloudwatch/home?region=%s#logsV2:log-groups/log-group/%s$3FlogStreamNameFilter=var.log.containers.{{ .podName }}_{{ .namespace }}_{{ .containerName }}
Expected behavior
- Follow AWS Guide to deploy FluentD: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-setup-logs-FluentBit.html
- Enable CloudWatch logs in Flyte:
task_logs.yaml: | plugins: logs: cloudwatch-enabled: true cloudwatch-log-group: 'bv-ml-pipelines' cloudwatch-region: 'us-east-1' kubernetes-enabled: false
- SUCCESS ✔️
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn’t been raised already?
- Yes
Have you read the Code of Conduct?
- Yes
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
(Optional) Set up FluentD as a DaemonSet to send logs to ...
By default, we send FluentD application logs and Kubernetes metadata to CloudWatch. If you want to reduce the volume of data being sent...
Read more >Cluster-level Logging in Kubernetes with Fluentd - Medium
Logs are crucial to help you understand what is happening inside your Kubernetes cluster. Even though most applications have some kind of ...
Read more >Fluentd on Kubernetes: Log collection explained - YouTube
We take a look at the fluentd dockerfile, how to run it on each ... Finally we see how to ship the collected...
Read more >How to Collect Metrics and Logs From AWS Fargate Workloads
To send logs from any ECS task to CloudWatch using Fluent Bit, create a Fluent Bit container in your task that will route...
Read more >OpenShift Container Platform 4.9 Logging
Fluentd log handling when the external log aggregator is unavailable ... Cloudwatch stream with multi-line error detection enabled.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@samhita-alla here
Aha, I understand, I agree changing the default can break other people, do you know for a fact that FlutentBit in compatibility mode works out of the box? I vaguely recall hostname was still a requirement though, no?
Perhaps a better approach is to: