Monitoring EC2

EC2 instances are created on top of a hypervisor, which is controlled by AWS. Thanks to the hypervisor, AWS is able to extract several metrics and feed them into CloudWatch metrics. This includes CPU utilization, network utilization (NetworkIn and NetworkOut), and disk performance (DiskReadOps, DiskWriteOps, DiskReadBytes, DiskWriteBytes).

Those metrics are available in the EC2 console when you select your instances and also in the CloudWatch metrics menu:

By default, the resolution of those metrics is five minutes. This means that new data points for your EC2 instances are collected every five minutes. If you have critical hosts where you wish to have a higher resolution, you can enable a feature called detailed monitoring on a per-instance basis, which will increase the frequency of those metrics to a one-minute resolution.

Unfortunately, only relying on the hypervisor metrics isn't enough. As you might have noticed, CloudWatch has information on how your disk performs, for example, but not on how much disk space you have left. That's because the hypervisor doesn't have visibility of the operating system. To supply that information, we will need to install an agent on our EC2 instances to collect those extra metrics.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset