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.

CloudWatch metrics

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 network utilization

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.

Monitoring memory and disk usage

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.

Set up instructions

Single EC2 instance

Monitoring Assistant
Monitor EC2 instances and receive alerts in Slack or Microsoft Teams!

  1. Add marbot to Slack or Microsoft Teams.
  2. Invite marbot to a channel.
  3. Follow the setup wizard.
It couldn't be easier!

Fleet of EC2 instances (Auto Scaling Group)

Monitoring Assistant
Monitor Auto Scaling Group and receive alerts in Slack or Microsoft Teams!

  1. Add marbot to Slack or Microsoft Teams.
  2. Invite marbot to a channel.
  3. Follow the setup wizard.
It couldn't be easier!
Michael Wittig

Michael Wittig

Consultant focusing on Amazon Web Services (AWS). Entrepreneur building marbot.io. Author of Amazon Web Services in Action, Rapid Docker on AWS, and cloudonaut.io.

You can contact me via Email, Twitter, and LinkedIn.

Published on and updated on

marbot teaser

Chatbot for AWS Monitoring

Configure monitoring for Amazon Web Services: CloudWatch, EC2, RDS, EB, Lambda, and more. Receive and manage alerts via Slack. Solve incidents as a team.

Slack
Add to Slack
Microsoft Teams
Add to Teams