I just launched a fleet of T3 instances but I only see CPU, Disk, and Network metrics in the console. Where is the memory utilization? Do I really need to write a custom script and push it as a custom metric just to see how much RAM my web server is using?
3 answers
AWS doesn't provide memory metrics by default because memory is managed by the OS (Linux/Windows), not the hypervisor. To CloudWatch, the RAM looks like a black box. You have two main options: install the unified CloudWatch Agent, which is the official AWS recommendation, or use a simple shell script with a cron job that calls the AWS CLI. The agent is much better because it can also collect disk swap usage, process-level stats, and even your application logs. Once installed, these will appear under a new namespace called "CWAgent" rather than the standard "AWS/EC2" namespace.
If you're using the agent, are you finding the configuration JSON easy to manage, or are you using Systems Manager to deploy it across your fleet?
If you are using containerized apps on Fargate, you get memory metrics for free without any agent setup. It’s only EC2 that requires this extra custom step.
That is a great point, Sandra. Moving to Fargate saved our team a lot of headache regarding "visibility debt" because the container-level metrics are built right into the service.
Jason, using Systems Manager (SSM) is definitely the way to go. You can store your agent configuration in the SSM Parameter Store and then use the "AmazonCloudWatch-ManageAgent" run command to push that config to hundreds of instances at once. It’s much more scalable than manually editing JSON files on every single server in your environment