Monitor EC2 instances with CloudWatch metrics and alarms
Michael Wittig – 09 Mar 2018 (updated 17 Aug 2021)
Virtual machines are a critical component of each system that needs monitoring. You can start a single Amazon EC2 instance or a fleet of EC2 instances managed by an Auto Scaling Group. Keep in mind that you are responsible for operating the EC2 instance starting at the operating system. Learn how to monitor your EC2 instances in the following.
Each EC2 instance sends metrics to CloudWatch that we can monitor with CloudWatch alarms. We recommend creating alarms for the following metrics:
CPUUtilization: The percentage of CPU used.
CPUCreditBalance: The number of CPU credits left (only applies to t* instance types).
StatusCheckFailed: Reports whether the instance has passed both the instance and system status check.
EBSIOBalance%: Percentage of I/O credits remaining in the EBS root volume burst bucket.
EBSByteBalance%: Percentage of throughput credits remaining in the EBS root volume burst bucket.
Monitoring the network utilization of your EC2 instance is essential, as the network is a limited resource. The instance type affects maximum and baseline network performance. Unfortunately, AWS does not provide us with a convenient CloudWatch metric to observe network utilization. Follow our Monitoring EC2 Network Utilization guide to workaround the missing capability of EC2.
Memory and disk usage are not reported to CloudWatch automatically. Therefore, you can not monitor the usage. Luckily, AWS provides the CloudWatch agent to collect and report those metrics for us. Learn how to install and configure the agent by reading Monitoring EC2 disk usage.
Monitor EC2 instances and receive alerts in Slack or Microsoft Teams!
Monitor Auto Scaling Group and receive alerts in Slack or Microsoft Teams!
Take your AWS monitoring to a new level! Chatbot for AWS Monitoring: Configure monitoring, escalate alerts, solve incidents.