Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why AWS CloudWatch does not have Memory usage metric for Autoscaling group

I am trying to create a graph for memory usage of an autoscaling group but I discovered that there is no such metric. Although there is Memory usage metric but it is for individual instances. It is useless since instances keep on changing in autoscaling group. I want to know the technical reason why AWS cloudwatch didn't provide it. Moreover I want to know the work around to achieve it.

like image 762
waqas Avatar asked Jun 12 '17 19:06

waqas


People also ask

How do I enable memory utilization metrics in CloudWatch?

Simply go to the CloudWatch dashboard in your AWS console and click on Metrics. You'll see a new CWAgent card. After you click on this card, you should see your EC2 memory usage in a graph. Be sure to give it some time for the collection process to start properly.

Can CloudWatch monitor memory?

You can use Amazon CloudWatch to collect metrics and logs from the operating systems for your EC2 instances.

On which metrics does AWS provide auto scaling?

Amazon EC2 Auto Scaling metrics that collect information about Auto Scaling groups are in the AWS/AutoScaling namespace. Amazon EC2 instance metrics that collect CPU and other usage data from Auto Scaling instances are in the AWS/EC2 namespace.


1 Answers

The metrics that AWS provides can be collected at the hypervisor level. But memory metrics (like disk metrics) is from the OS level. So it is a custom metric that you have to periodically push to CloudWatch.

Monitoring Memory and Disk Metrics for Amazon EC2 Linux Instances shows how to push your metrics to CloudWatch. Install the scripts (along with credentials if you are not using IAM role) before creating your AMI and you are set. Each instance in AS will start pushing its memory metric to CloudWatch. Not sure how useful it will be for you.

like image 91
helloV Avatar answered Oct 10 '22 22:10

helloV