When it comes to wastage in EC2 instances, Stax Spotlight can pull in metrics from CloudWatch to track an instances memory utilisation.

You can either use the AWS CloudWatch Agent to collect these metrics, or setup custom metrics. We'd recommend using the CloudWatch Agent as it integrates with AWS Systems Manager for unified metrics and logs collection, improving the overall observability of your EC2 Instances. 

If you do choose to use Custom CloudWatch metrics, rather than the above agent, you’ll need to set up one of the following CloudWatch metrics:

For any instance type:

  • Telegraf/MemUsedPercent
  • Memory/MemFreeBytes + Memory/MemTotalBytes

For Linux:

  • System/Linux/MemoryUtilization
  • Linux/System/MemoryUtilization

For Windows:

  • Windows/Default/AvailableMemory
  • System/Windows/AvailableMemory
  • Windows/Default/Available Mbytes
  • System/Windows/Available Mbytes
  • Windows/Default/Available Memory
  • System/Windows/Available Memory

You can find more information about how to setup these metrics in the references below.

Amazon Web Services Documentation:

Publish Custom Metrics

Configuring a Windows Instance using the EC2Config Service

Monitoring Memory and Disk Metrics for Amazon EC2 Linux Instances

Third party agent we use at Stax Spotlight for setting up metrics:

https://github.com/influxdata/telegraf 

Did this answer your question?