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?
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 toElastic Beanstalk
, which analyzes the metrics to determine the health of theinstances
in yourenvironments
.The
Elastic Beanstalk
health agent gathers metrics aboutinstances
from "web server logs" and the "operating system".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:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aeb-metricscollected.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-metrics.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-health-console.html