How to setup AWS ECS events monitoring metrics

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ส.ค. 2022
  • It's not enough to just have the monitoring of your logs If you are running your services in AWS ECS. Sometimes your ECS tasks might crash without any error logs, or sometimes they might not even start for some reason and the problem is that you won't get any monitoring alerts from you logs about it.
    Hopefully AWS ECS tasks are producing events about any changes of the task's state, but unfortunately there are no default CloudWatch metrics to monitor these events.
    So in this video I'm showing you a workaround of how to create CloudWatch monitoring metrics for the AWS ECS events.
    Here's a link to the Terraform configuration of the all resources we are creating in this video gist.github.com/kuzemkon/0363...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 11

  • @olafatoki9981
    @olafatoki9981 หลายเดือนก่อน +1

    i realised on the terraform code, the alarm dimension was pointing to an ecs service, which i think should point to the log-group instead,
    i am not also clear on the sns role and policy, i am thinking it should be a role to allow events to perform those policies

  • @ffelegal
    @ffelegal ปีที่แล้ว +2

    Thanks..that was really helpful

  • @lordaugustus9686
    @lordaugustus9686 7 หลายเดือนก่อน +1

    If you have done everything as in the video, don't forget the aws_cloudwatch_log_resource_policy to be able to store logs into log group.

    • @kuzemkon
      @kuzemkon  4 หลายเดือนก่อน

      Thank you for your feedback!

  • @harithabandi2711
    @harithabandi2711 2 หลายเดือนก่อน

    Hi, I have a question, is it possible to monitor the ecs auto scaling in metrics?
    If yes, how can we do that?

    • @kuzemkon
      @kuzemkon  2 หลายเดือนก่อน

      Hi, thanks for your question.
      Yes, it's possible.
      Do you want to get the alert notification when the service is auto-scaled, or do you want to get any other monitoring action?

    • @harithabandi2711
      @harithabandi2711 2 หลายเดือนก่อน

      Hi, thanks for the response.
      I don't need an alert, I just want to see the number of running tasks in metrics along with cpu and memory utilisation.

    • @kuzemkon
      @kuzemkon  2 หลายเดือนก่อน +1

      Got it, thanks for the clarification. In that case, you can create a custom AWS CloudWatch Dashboard and visualize the number of running ECS tasks with the respective widget there.

  • @user-mn7yw6fq1q
    @user-mn7yw6fq1q 3 หลายเดือนก่อน

    while creating an alarm i am not able to fetch my metric which i have created

    • @kuzemkon
      @kuzemkon  3 หลายเดือนก่อน

      Thanks for your feedback. There were some issues recently with ECS metrics, so I've made some updates in the Gist with the Terraform code. You can find the updated configuration by this link: gist.github.com/kuzemkon/03633f2e8aeb801053b18162db7f28e2

    • @olafatoki9981
      @olafatoki9981 หลายเดือนก่อน

      if you are creating the alarm from the console, you can easily click on the metric filter when you go to log-group>meetric-filter and use the create alarm button there