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:
- Memory/MemFreeBytes + Memory/MemTotalBytes
- 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:
Third party agent we use at Stax Spotlight for setting up metrics: