Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the best way to monitor the MemoryUtilization for a Bottlerocket Container instance for ECS #4194

Open
danblacklist opened this issue Sep 15, 2024 · 4 comments
Labels
status/needs-triage Pending triage or re-evaluation type/bug Something isn't working

Comments

@danblacklist
Copy link

Image I'm using: ami-0af64c4e3fc6bf8d2

I'd like to monitor the MemoryUtilization at the instance (host) level for my ECS container instances running the Bottlerocket AMI, what is the recommended approach ? Container Insights ?

@danblacklist danblacklist added status/needs-triage Pending triage or re-evaluation type/bug Something isn't working labels Sep 15, 2024
@brian-mertens
Copy link

I have the same exact question, also for ECS

What is the recommended way to monitor memory utilization on a Bottlerocket for ECS instance?

So I could create a CloudWatch alarm to alert me if an container instance is low on available memory

@arnaldo2792
Copy link
Contributor

Hello @danblacklist / @brian-mertens , ideally, one could use Container Insights for instance level metrics. However, the feature doesn't work in Bottlerocket because we have a patch of the ECS agent that prevents container insights from working as expected. I'll follow up with the team that owns Container Insights to make this work for Bottlerocket.

In the meantime, I've been thinking about how users could deploy a somewhat privileged task to extract the information required from the host using either CloudWatch or Fluentbit. I'll check with the team to align on the suggestion we want to make before we post it here so that you all have a mechanism to extract what you need.

@brian-mertens
Copy link

Hi @arnaldo2792 !

I see I can do $ cat /proc/meminfo from the control container and admin container shells

Could I create a small task that reads from /proc/meminfo or do tasks not have that privilege?

@brian-mertens
Copy link

ok I feel dumb - I just found the built-in ECS MemoryUtilization cloudwatch metric

pushed by the ecs-agent I would guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/needs-triage Pending triage or re-evaluation type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants