Monitoring Jump Start: EC2 instance
Michael Wittig – 09 Mar 2018
Virtual machines are a critical component of each system that needs monitoring. You can start a single EC2 instance or a fleet of EC2 instances managed by an Auto Scaling Group. We created a CloudFormation template that you can use to monitor any EC2 instance (Windows and Linux) in a minute.
What do I have to monitor?
Each EC2 instance sends metrics to CloudWatch that we can observe with CloudWatch Alarms. We recommend to create alarms for the following metrics:
- CPU
- CPUUtilization
- CPUCreditBalance
- Status checks
- StatusCheckFailed
If a metric crosses the alarm’s threshold, you receive an alert in Slack.
Set up instructions
Single EC2 instance
- Create the CloudFormation stack with a single click
- Ensure that you selected the AWS region of your EC2 instance monitoring target
- Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it on your Slack channel.
- Set the InstanceId parameter to the ID of your EC2 instance.
- Review the threshold parameters
- Save by clicking the Create button.
Fleet of EC2 instances managed by Auto Scaling Group
- Create the CloudFormation stack with a single click
- Ensure that you selected the AWS region of your Auto Scaling Group monitoring target
- Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it on your Slack channel.
- Set the AutoScalingGroupName parameter to the name of your Auto Scaling Group
- Review the threshold parameters
- Save by clicking the Create button.
Take your AWS monitoring to a new level! Chatbot for AWS Monitoring: Configure monitoring, receive alerts, solve incidents.