[Monitoring Disk use on ECS Container Type Fargate]

0

Hi everyone, I am using ECS Fargate to build web application. I'm currently looking to monitor a container's disk usage? I've enabled the Insight container, but I don't see disk usage metrics Can you help me on this issue?

2 Answers
0

I haven't tested by myself buy maybe docker stats provide the information that you need

https://docs.docker.com/engine/reference/commandline/stats/

I think that you can get this information using the metadata endpoint...

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint-v4.html

Try

${ECS_CONTAINER_METADATA_URI_V4}/stats
${ECS_CONTAINER_METADATA_URI_V4}/task/stats
answered 2 years ago
0

Hello!

Just to share more up-to-date information here.

Amazon CloudWatch Container Insights provides a suite of metrics and logs to monitor the performance and resource utilization of your containerized applications and their underlying resources. For Docker containers (Tasks), the following metrics are available when you complete the steps in 'Setting up Container Insights on Amazon ECS for cluster- and service-level metrics'. These metrics are available automatically once Container Insights is enabled and set up and can be filtered by cluster, service, and task, allowing you to monitor disk usage at different levels of granularity. Some relevant metrics for monitoring disk storage usage for tour Tasks:

  1. 'EphemeralStorageReserved' / 'EphemeralStorageUtilized': These metrics represents the number of bytes reserved/used by the container's filesystem. Ephemeral storage is used for the container root filesystem and any bind mount host volumes defined in the container image and task definition. [2].
  2. 'EBSFilesystemSize' / 'EBSFilesystemUtilized' : The total amount, in gigabytes (GB), of Amazon EBS filesystem storage that is allocated/used to the resources specified by the dimensions you're using. [2].

ECS Fargate supports different storage settings, so some metrics will be more relevant than others depending on the configuration.

Thanks!

profile pictureAWS
EXPERT
Pablo
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions