< Back

Monitoring: Amazon EC2 Auto Scaling

Amazon EC2 Auto Scaling is a service provided by Amazon Web Services (AWS) that automatically adjusts the capacity of EC2 instances to match an application’s demand. It monitors the application’s traffic and other metrics, such as CPU usage, and automatically adds or removes EC2 instances as needed to maintain performance and availability. EC2 Auto Scaling helps optimize infrastructure costs by ensuring that only the necessary resources are used at anytime. It can also integrate with other AWS services, such as Elastic Load Balancing and Amazon CloudWatch, to provide a comprehensive auto-scaling solution for your applications.

Why should you monitor Amazon EC2 Auto Scaling?

Monitoring Amazon EC2 Auto Scaling is crucial to detecting failures when launching EC2 instances. Some potential issues that can occur when launching EC2 instances include misconfiguration, insufficient capacity, and outages. Let’s take a closer look at each of these issues:

  • Misconfiguration: When launching EC2 instances, misconfiguration can occur if the launch configuration is not set up correctly. For example, if the wrong AMI (Amazon Machine Image) is used.
  • Not enough capacity: When launching EC2 instances, there may not be enough capacity available to meet the demand of the application.
  • Outages: Launching EC2 instances might fail because of hardware issues or network problems.

Monitoring: Amazon Macie

How does monitoring Amazon EC2 Auto Scaling work?

Without further ado, marbot monitors all auto-scaling groups within your AWS account. Here is what an alert delivered to a Microsoft Teams channel looks like.

Amazon EC2 Auto Scaling alert in Microsoft Teams

And here is the same alert in Slack.

Amazon EC2 Auto Scaling alert in Slack

How do you set up monitoring of Amazon EC2 Auto Scaling?

marbot works with Slack and Microsoft Teams. Please select your platform:

Which metrics and events does marbot monitor in detail?

marbot creates CloudWatch alarms to monitor the following metrics of all ASGs automatically.

Metric Description
CPUUtilization Get alerted if an ASG is under high load for significant periods.
CPUCreditBalance Get alerted if a burstable ASG runs out of CPU credits, resulting in a significant performance drop.
EBSIOBalance% Get alerted if an ASG runs out of burst credits for EBS.
EBSByteBalance% Get alerted if an ASG runs out of burst credits for EBS.
StatusCheckFailed Get alerted if an ASG has failing EC2 instances.

marbot creates EventBridge rules to monitor the following events of all ASGs automatically.

Event Type Description
EC2 Instance Launch Unsuccessful Get alerted if an EC2 instance launch fails (e.g., spot capacity unavailable, KMS key not accessible).
EC2 Instance Terminate Unsuccessful Get alerted if an EC2 instance termination fails.
EC2 Auto Scaling Instance Refresh Failed Get alerted if an EC2 instance refresh fails.

How to fine-tune the monitoring of ASGs?

It is possible to fine-tune the CloudWatch alarms created by marbot by adding tags to your ASG.

Tags are read every six hours. Therefore, it can take up to six hours before the CloudWatch alarm is adjusted.

tag key default value allowed values
marbot on on,off
marbot:cpu-utilization static static,off
marbot:cpu-utilization:threshold 80 0-100
marbot:cpu-utilization:period 3600 <= 86400 and multiple of 60
marbot:cpu-utilization:evaluation-periods 1 >= 1 and $period*$evaluation-periods <= 86400
marbot:cpu-credit-balance static static,off
marbot:cpu-credit-balance:threshold 20 >= 0
marbot:cpu-credit-balance:period 600 <= 86400 and multiple of 60
marbot:cpu-credit-balance:evaluation-periods 1 >= 1 and $period*$evaluation-periods <= 86400
marbot:ebs-io-credit-balance static static,off
marbot:ebs-io-credit-balance:threshold 20 0-100
marbot:ebs-io-credit-balance:period 600 <= 86400 and multiple of 60
marbot:ebs-io-credit-balance:evaluation-periods 1 >= 1 and $period*$evaluation-periods <= 86400
marbot:ebs-throughput-credit-balance static static,off
marbot:ebs-throughput-credit-balance:threshold 20 0-100
marbot:ebs-throughput-credit-balance:period 600 <= 86400 and multiple of 60
marbot:ebs-throughput-credit-balance:evaluation-periods 1 >= 1 and $period*$evaluation-periods <= 86400

More help needed? Or want to share feedback?

If you experience any issues, let us know.

E-mail icon
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.

Add to Slack
Microsoft Teams
Add to Teams