跳转至

L8 AWS ELB Monitoring

1 AWS ELB Monitoring

  • Elastic Load Balancing publishes data points to CloudWatch about the load balancers and back-end instances
  • Elastic Load Balancing reports metrics to CloudWatch only when requests are flowing through the load balancer.
    • If there are requests flowing through the load balancer, Elastic Load Balancing measures and sends its metrics in 60-second intervals.
    • If there are no requests flowing through the load balancer or no data for a metric, the metric is not reported.

2、CloudWatch Metrics

2-1 HealthyHostCount, UnHealthyHostCount

  • Number of healthy and unhealthy instances registered with the load balancer.
  • Most useful statistics are average, min, and max

2-2 RequestCount

  • Number of requests completed or connections made during the specified interval (1 or 5 minutes).
  • Most useful statistic is sum

2-3 Latency

  • Time elapsed, in seconds, after the request leaves the load balancer until the headers of the response are received.
  • Most useful statistic is average

2-4 SurgeQueueLength

  • Total number of requests that are pending routing.
  • Load balancer queues a request if it is unable to establish a connection with a healthy instance in order to route the request.
  • Maximum size of the queue is 1,024. Additional requests are rejected when the queue is full.
  • Most useful statistic is max, because it represents the peak of queued requests.

2-5 SpilloverCount

  • The total number of requests that were rejected because the surge queue is full. Should ideally be 0
  • Most useful statistic is sum.

2-6 HTTPCode_ELB_4XX,HTTPCode_ELB_5XX

  • Client and Server error code generated by the load balancer
  • Most useful statistic is sum.

2-7 HTTPCode_Backend_2XX, HTTPCode_Backend_3XX, HTTPCode_Backend_4XX, HTTPCode_Backend_5XX

  • Number of HTTP response codes generated by registered instances
  • Most useful statistic is sum.

2-8 Elastic Load Balancer Access Logs

  • Elastic Load Balancing provides access logs that capture detailed information about all requests sent to your load balancer.
  • Each log contains information such as the time the request was received, the client’s IP address, latencies, request paths, and server responses.
  • Elastic Load Balancing captures the logs and stores them in the Amazon S3 bucket
  • Access logging is disabled by default and can be enabled without any additional charge. You are only charged for S3 storage

### 2-9 CloudTrail Logs\ * AWS CloudTrail can be used to capture all calls to the Elastic Load Balancing API made by or on behalf of your AWS account and either made using Elastic Load Balancing API directly or indirectly through the AWS Management Console or AWS CLI * CloudTrail stores the information as log files in an Amazon S3 bucket that you specify. * Logs collected by CloudTrail can be used to monitor the activity of your load balancers and determine what API call was made, what source IP address was used, who made the call, when it was made, and so on

3 AWS Certification Exam Practice Questions

  1. An admin is planning to monitor the ELB. Which of the below mentioned services does not help the admin capture the monitoring information about the ELB activity
    • ELB Access logs
    • ELB health check
    • CloudWatch metrics
    • ELB API calls with CloudTrail
  2. A customer needs to capture all client connection information from their load balancer every five minutes. The company wants to use this data for analyzing traffic patterns and troubleshooting their applications. Which of the following options meets the customer requirements?
    • Enable AWS CloudTrail for the load balancer.
    • Enable access logs on the load balancer.
    • Install the Amazon CloudWatch Logs agent on the load balancer.
    • Enable Amazon CloudWatch metrics on the load balancer
  3. Your supervisor has requested a way to analyze traffic patterns for your application. You need to capture all connection information from your load balancer every 10 minutes. Pick a solution from below. Choose the correct answer:
    • Enable access logs on the load balancer
    • Create a custom metric CloudWatch filter on your load balancer
    • Use a CloudWatch Logs Agent
    • Use AWS CloudTrail with your load balancer