- Newest
- Most votes
- Most comments
Hello.
I don't think you can see which task a request was assigned to using CloudWatch metrics.
https://docs.aws.amazon.com/AmazonECS/latest/userguide/monitoring-fargate-usage.html
Therefore, I think it is best to check the access logs and application logs of ECS Fargate tasks.
https://docs.aws.amazon.com/AmazonECS/latest/userguide/using_awslogs.html
Hi,
I believe that NLB request tracing adding a header X-Amzn-Trace-Id
and forwarding is what you need: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-request-tracing.html
If you correlate this header with the CW logs at NLB, you can define which task gets which requets.
If your final goal is to track unhealthy targets, this blog post may help: https://aws.amazon.com/blogs/networking-and-content-delivery/identifying-unhealthy-targets-of-elastic-load-balancer/
Best,
Didier
Relevant content
- asked 2 years ago
- How can I troubleshoot issues when I use the AWS Load Balancer Controller to create a load balancer?AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago