With an increasing number of organizations migrating their applications and workloads to containers, the ability to monitor and track container health and usage is more critical than ever. Many teams are already using the Metricbeat docker module to collect Docker container monitoring data so it can be stored and analyzed in Elasticsearch for further analysis. But what happens when users are using Amazon Elastic Container Service (Amazon ECS)? Can Metricbeat still be used to monitor Amazon ECS? Yes! In this blog, we will lead you step by step through how to monitor Amazon ECS with Elastic Observability! What is Amazon ECS?Amazon ECS is a highly scalable, fully managed service that makes it easy to orchestrate and provision Docker containers. It is backed by two different underlying cloud services called “launch types” that determine how the compute resources will be managed: EC2 and Fargate. When using the EC2 launch type, containers run on EC2 instances that users have to manage themselves. When using the alternate Fargate launch type instead, users only need to specify containers and tasks. Fargate will then take care of provisioning, configuring, and managing the backend infrastructure. Let’s look at how to monitor each launch type with Metricbeat! How to monitor Amazon ECS EC2 containers with ElasticWhen deploying containers on EC2, users are responsible for deploying and managing their own Amazon ECS cluster. From a monitoring perspective, these EC2 instances are like any other normal VM, which means that users can connect to them and collect Docker statistics from the Docker daemon directly. Let’s see how we can monitor our Amazon ECS containers running on EC2 in a few simple steps: Prerequisite: SSL keyWhen creating your Amazon ECS cluster, make sure you attach a valid SSL key so the instances are accessible via SSH:
Step 1: Security groupIn the networking section make sure you select a Security group that will allow you to enable SSH access (port 22):
Step 2: Verify EC2 instanceAfter you have properly launched the Amazon ECS cluster, you should be able to list your EC2 instances:
Step 3: SSL connectionYou can connect to each one of them via SSH using the key pair you attached on step 1, for instance:
https://www.elastic.co/blog/how-to-monitor-amazon-ecs-with-elastic-observability
Login to add comment
Other posts in this group
Version 7.17.27 of the Elastic Stack was released today. We recommend you upgrade to this latest version. We recommend 7.17.27 over the previous versi