What is the difference between Environment metrics and Instance metrics in Elastic Beanstalk?

497 Views Asked by At

In Elastic Beanstalk, there are a number of "CloudWatch Custom Metrics" that are available which are divided into two categories: Instance metrics and Environment metrics. This document provides a comprehensive list of all the EB metrics available. (Side note: what does the "60" value in the JSON config document mean?)

Some of the metrics seem to directly overlap with each other and I'm trying to understand the difference. For instance, both Instance and Environment have a metric called ApplicationRequests5xx, and the description of each is "The number of requests that completed with a 5XX status code." So what are the technical differences between the Environment version and the Instance version? And which one, generally, would I want? Or do I need both?

1

There are 1 best solutions below

0
On

Instance metrics provide information about the health of instances in your environment.

The AWS Elastic Beanstalk Elastic Beanstalk health agent gathers and relays metrics about instances to Elastic Beanstalk, which analyzes the metrics to determine the health of the instances in your environments.

The Elastic Beanstalk health agent gathers metrics about instances from "web server logs" and the "operating system".

"Web server" logs :
    provide information about incoming HTTP requests, how many requests came in, how many resulted in errors, and how long they took to resolve.


"The operating system" :
     provides snapshot information about the state of the instances' resources, the CPU load and distribution of time spent on each process type. These metrics are a subset of the information that you would see if you ran top on a Linux server.

The health agent gathers "web server" and "operating system" metrics and relays them to Elastic Beanstalk every 10 seconds. Elastic Beanstalk analyzes the data and uses the results to update the health status for each instance and the environment.

The AWS Management Console displays your environment's status and application health at a glance. In the Elastic Beanstalk console applications page, each environment is color-coded to indicate an environment's status.


These documentation links will further clarify the whole related details:

  1. https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aeb-metricscollected.html

  2. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-metrics.html

  3. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-health-console.html