AWS CloudWatch Support

CloudWatch agent for memory and disk metrics.

By default EC2 reports CPU, network and disk I/O, but not memory used or disk space, because those live inside the operating system. The CloudWatch agent collects them. We install it at scale, write a config that keeps costs sane and fix the usual permission and config problems.

mem_used_percentMemory metric name
disk_used_percentDisk metric name
CWAgentDefault namespace
SSM ParameterStore shared config

When You Need This

The situations where this work pays for itself.

Signs it is time

  • You need memory or disk space alarms on EC2 or on-premises servers
  • Instances run out of disk and nobody is alerted
  • The agent is installed but no metrics appear
  • You want logs from files shipped to CloudWatch
  • You manage many instances and need consistent configuration

What you get

  • Agent configuration stored in Parameter Store and deployed by SSM
  • Launch template or image changes so new instances are covered
  • Memory and disk alarms with owners
  • Troubleshooting notes for your environment

How we do it

A clear, safe process you can follow along with.

1. Grant permissions

The instance role needs the CloudWatchAgentServerPolicy managed policy, plus Systems Manager access if you deploy through SSM. A missing role is the most common reason no data arrives.

2. Write the agent configuration

We use the config wizard or a hand-written JSON file to choose metrics such as mem_used_percent, disk_used_percent for specific mount points and swap, with a sensible collection interval. Fewer metrics and longer intervals keep cost down.

3. Control dimensions

Each unique combination of dimensions is a separate custom metric. We use append_dimensions with AutoScalingGroupName instead of InstanceId, so metrics survive instance replacement and alarms scale with the group.

4. Store config in SSM and deploy

We save the config in Parameter Store and use State Manager or Run Command to install and start the agent on all matching instances, including new ones through the launch template.

5. Add log collection

If needed we add a logs section to ship application files to CloudWatch Logs with a retention setting, avoiding unbounded log groups.

6. Verify and alarm

We check the agent log at amazon-cloudwatch-agent.log, confirm the CWAgent metrics appear in the console, then create alarms for memory and disk thresholds that include growth trends.

Mistakes we help you avoid

Common ways this goes wrong, and what we do instead.

No IAM permissions

Without CloudWatchAgentServerPolicy the agent cannot publish, and the failure is only in the agent log.

InstanceId dimension on autoscaled fleets

Metrics stop when instances are replaced, leaving orphan alarms.

Collecting every metric at high resolution

Custom metrics are billed. Collect what you act on.

Monitoring only the root volume

Data volumes fill up too. List the mount points.

Frequently Asked Questions

Does EC2 report memory usage to CloudWatch by default?

No. EC2 metrics come from the hypervisor, so memory and disk space need the CloudWatch agent running inside the instance.

Why are my CloudWatch agent metrics missing?

Check the agent is running, the instance role has the right policy, the config is valid and the region and namespace are what you are looking at. The agent log shows errors.

Are CloudWatch agent metrics free?

They are custom metrics, which are billed per metric and for alarms and API use, so we keep the metric and dimension count deliberate.

Want Help With CloudWatch agent for memory and disk metrics?

Schedule an appointment. Tell us about your environment and we will outline the safest, highest-value approach.

Schedule Appointment › No commitment required