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.

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 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
  2. Copy the ([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 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 on 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
Michael Wittig

Michael Wittig

I’m the author of Amazon Web Services in Action. I work as a software engineer, and independent consultant focused on AWS and DevOps.

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

Briefcase icon
Hire me
marbot teaser

Incident Management for Slack

Team up to solve incidents with marbot. Never miss a critical alert. Escalate alerts from your AWS infrastructure among your team members. Strong integrations with all parts of your AWS infrastructure: CloudWatch, Elastic Beanstalk, RDS, EC2, ...

Slack icon
Try for free