Monitoring Jump Start: Elastic Beanstalk environment

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.

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

If a metric crosses the alarm’s threshold, you will 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.

  1. In your Elastic Beanstalk project’s source code, create a folder .ebextensions (learn more https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html).
  2. Copy the (https://github.com/marbot-io/monitoring-jump-start/blob/master/marbot-elastic-beanstalk.config)[marbot-elastic-beanstalk.config] file into the .ebextensions folder (file must end with .config!).
  3. Adjust the MarbotEndpointId option_settings in the marbot-elastic-beanstalk.config file.
  4. 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 will receive an alert in Slack.

Set up instructions

  1. Create the CloudFormation stack with a single click
    1. Ensure that you selected the AWS region of your Elastic Beanstalk environment monitoring target
    2. Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel.
    3. Set the ApplicationName parameter to the name of the Elastic Beanstalk application.
    4. Set the EnvironmentName parameter to the name of the Elastic Beanstalk environment.
    5. Review the threshold parameters
    6. Save by clicking the Create button.
      Monitoring Jump Start: Elastic Beanstalk environment

Published on