Monitoring Jump Start: Elastic Beanstalk environment
Michael Wittig – 14 Mar 2018
Elastic Beanstalk is a platform to run your applications on AWS. Elastic Beanstalk also provides features to help you to monitor your applications. We created a CloudFormation template that you can use to monitor any Elastic Beanstalk environment in a minute.
Each EC2 instance sends metrics to CloudWatch that we can observe with CloudWatch Alarms. We recommend to create alarms for the following metrics:
If a metric crosses the alarm’s threshold, you receive an alert in Slack. Elastic Beanstalk comes with a mechanism to customize environments that you can use to automate the creation of CloudWatch Alarms.
- In your Elastic Beanstalk project’s source code, create a folder
.ebextensions(learn more https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html).
- Copy the (https://github.com/marbot-io/monitoring-jump-start/blob/master/marbot-elastic-beanstalk.config)[marbot-elastic-beanstalk.config] file into the
.ebextensionsfolder (file must end with .config!).
- Adjust the MarbotEndpointId option_settings in the
- Deploy the application.
Besides metrics, Elastic Beanstalk sends out notifications if the state of the environment has changed. E.g., because of a failed deployment.
Since AWS does not support filtering the notifications, marbot takes over filtering for you. For each new important notification, you receive an alert in Slack.
- Create the CloudFormation stack with a single click
- Ensure that you selected the AWS region of your Elastic Beanstalk environment 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 ApplicationName parameter to the name of the Elastic Beanstalk application.
- Set the EnvironmentName parameter to the name of the Elastic Beanstalk environment.
- 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.