Amazon ECS Service Connect inbound and outbound traffic requests metrics not showing up

0

We use ECS Fargate with Service Connect enabled for our microservices. We're using .net core 3.1 APIs (don't know if it's relevant), service connect and api gateways to make our applications available for the world, right now I'm in need for the request count, and also the outbound HTTP 4XX and 5XX response metrics to make the correct decisions for microservice redevelopment and renew.

Got into the https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-metrics.html and already made sure that ecsInstanceRole has the ecs:StartTelemetrySession permission, what else should I search for?

ecs service console

What I need to do so the Service Connect/ECS RequestCount metric be available?

  • AWS/ECS namespace should have Service Connect specific metrics such as: ActiveConnectionCount, NewConnectionCount, RequestCount, ProcessedBytes, HTTPCode_Target_5XX_Count, HTTPCode_Target_4XX_Count, and so on. From the screenshot shared, I'm not sure if you are checking this namespace. Could you please confirm that?

  • Went to Cloudwatch metrics to be sure, but when I set ECS, ClusterName, DiscoveryName, ServiceName and chose this service, there is only ProcessedBytes, NewConnectionCount and ActiveConnectionCount

  • Also found out that my react (next.js) applications are collecting that metrics, just the .net apis aren't

  • I'm glad that you were able to solve the issue. Thank you for sharing the solution!

1 回答
1
已接受的回答

Found out the problem, the port mapping protocol was on "None" which is assumed as TCP, changing it to HTTP seems like resolved the issue. Unfortunately changing the port mapping protocol requires you to delete the service and create with the new task definition.

Gustavo
已回答 8 个月前
  • Good day Gustavo,

    This is Zubair from the AWS Premium Support Team regarding the post that you've create on the errors that you were getting due to the port mapping protocol.

    You're correct in saying that changing this to HTTP would resolve the issue and your concern regarding the port mapping protocol will create a new revision of the task definition.

    Kindest regards,

    Zubair S.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则