Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Memory Utilization of EC2 instance is not default metric of Amazon CloudWatch?

Three Amazon CloudWatch default metrics of EC2 instance are:

  1. CPU
  2. Disk I/O
  3. Data transfer

Memory Utilization of EC2 instance is custom metric.

I don't know why because Memory Ultilization is one of the very important metrics need to be monitor.

Could anyone help to explain to me about this?

like image 695
Dat Ho Avatar asked Aug 06 '19 04:08

Dat Ho


People also ask

How would you monitor your EC2 instance memory usage 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.

What is default metric of CloudWatch?

By default, Amazon EC2 sends metric data to CloudWatch in 5-minute periods. To send metric data for your instance to CloudWatch in 1-minute periods, you can enable detailed monitoring on the instance.


1 Answers

The Amazon EC2 service provides virtual machines that emulate computer hardware, such as CPU, RAM and disk.

The AWS service cannot see "inside" your instance because it is running an Operating System (Linux or Windows). It is the operating system that controls how memory is allocated, so it is not possible to determine "Memory Utilization" purely by looking at the virtual hardware.

That's why the metrics provided are CPU Utilization, Network and Disk — they all involve the virtual hardware.

If you want metrics from "inside" the instance, such as memory usage, free disk space and the number of logged-in users, then you need something that is running on the operating system to extract those metrics and send them to CloudWatch.

You can do this by Collecting Metrics and Logs from Amazon EC2 Instances and On-Premises Servers with the CloudWatch Agent because the CloudWatch Agent is installed on the operating system.

like image 173
John Rotenstein Avatar answered Oct 23 '22 04:10

John Rotenstein