The first step to using Prometheus with Amazon ECS on AWS Fargate is to set up a container that is configured to provide metrics to Prometheus. Set up a Java-based, Prometheus enabled container Exporters generally listen on a specific port and path for Prometheus requests (like :9404/metrics/). Typically, an exporter is used for data that you don’t have full control over (like JVM data). It’s common to integrate an exporter with your application, to accept requests from Prometheus and provide the data requested. It works by scraping metrics from the sites it is monitoring and sends off those metrics to a database for viewing. Prometheus is already widely used to monitor Kubernetes workloads. What do we do if we need to better monitor our containerized applications? Are we limited to using CPU and memory metrics for all our monitoring or is there a better way? Fortunately, in September 2020, the CloudWatch team announced the general availability of Prometheus metrics from Amazon ECS, Amazon EKS, AWS Fargate, and Kubernetes clusters. When scaling is required, you need a better indicator than just monitoring available container memory. For example, in Java applications, JVM memory usage or connection count might be a better indicator of performance. They have scaling characteristics that are correlated with CPU or memory, but those metrics might not be the best indicator of application performance. Many applications are not directly CPU- or memory-bound. The olden days of monitoring containerized applications You can use this information to performance tune your application or decide when you should scale. ![]() The CloudWatch Container Insights dashboard shows some of the processing that is happening inside your container. By using its performance monitoring features, available in the Amazon CloudWatch console, you can see the CPU, memory, network, and bytes read/written of a container. At the end of this post, you’ll be able to use metrics gathered using Prometheus to perform automatic scaling actions on your Amazon ECS on AWS Fargate application.ĬloudWatch Container Insights gives you visibility into what is happening inside your container. Although there is more information about Prometheus already available, it can be difficult to get started if you’ve come to containers through Amazon ECS on AWS Fargate. In this blog post, I show how you can monitor and scale your Amazon Elastic Container Service (Amazon ECS) on AWS Fargate application using Prometheus metrics. If you’ve ever run a containerized workload, you know that it can be tricky to check what’s happening in your container.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |