Menu
Elastic Load Balancing
Application Load Balancers

CloudWatch Metrics for Your Application Load Balancer

Elastic Load Balancing publishes data points to Amazon CloudWatch for your load balancers and your targets. CloudWatch enables you to retrieve statistics about those data points as an ordered set of time-series data, known as metrics. Think of a metric as a variable to monitor, and the data points as the values of that variable over time. For example, you can monitor the total number of healthy targets for a load balancer over a specified time period. Each data point has an associated time stamp and an optional unit of measurement.

You can use metrics to verify that your system is performing as expected. For example, you can create a CloudWatch alarm to monitor a specified metric and initiate an action (such as sending a notification to an email address) if the metric goes outside what you consider an acceptable range.

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.

For more information, see the Amazon CloudWatch User Guide.

Application Load Balancer Metrics

The AWS/ApplicationELB namespace includes the following metrics.

Metric Description
ActiveConnectionCount

The total number of concurrent TCP connections active from clients to the load balancer and from the load balancer to targets.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

ClientTLSNegotiationErrorCount

The number of TLS connections initiated by the client that did not establish a session with the load balancer. Possible causes include a mismatch of ciphers or protocols.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

ConsumedLCUs

The number of load balancer capacity units (LCU) used by your load balancer. You pay for the number of LCUs that you use per hour. For more information, see Elastic Load Balancing Pricing.

Reporting criteria: There is a nonzero value

Statistics: All

Dimensions

  • LoadBalancer

HealthyHostCount

The number of targets that are considered healthy.

Reporting criteria: Always reported

Statistics: The most useful statistics are Average, Minimum, and Maximum.

Dimensions

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

HTTPCode_ELB_4XX_Count

The number of HTTP 4XX client error codes that originate from the load balancer. Client errors are generated when requests are malformed or incomplete. These requests have not been received by the target. This count does not include any response codes generated by the targets.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

HTTPCode_ELB_5XX_Count

The number of HTTP 5XX server error codes that originate from the load balancer. This count does not include any response codes generated by the targets.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

HTTPCode_Target_2XX_Count, HTTPCode_Target_3XX_Count, HTTPCode_Target_4XX_Count, HTTPCode_Target_5XX_Count

The number of HTTP response codes generated by the targets. This does not include any response codes generated by the load balancer.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

IPv6ProcessedBytes

The total number of bytes processed by the load balancer over IPv6.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

IPv6RequestCount

The number of IPv6 requests received by the load balancer.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

NewConnectionCount

The total number of new TCP connections established from clients to the load balancer and from the load balancer to targets.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

ProcessedBytes

The total number of bytes processed by the load balancer over IPv4 and IPv6.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

RejectedConnectionCount

The number of connections that were rejected because the load balancer had reached its maximum number of connections.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

RequestCount

The number of requests processed over IPv4 and IPv6. This count includes only the requests with a response generated by a target of the load balancer.

Reporting criteria: Always reported

Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, and Average all return 1.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

RequestCountPerTarget

The average number of requests received by each target in a target group. You must specify the target group using the TargetGroup dimension.

Reporting criteria: There is a nonzero value

Statistics: The only valid statistic is Sum. Note that this represents the average not the sum.

Dimensions

  • TargetGroup

  • TargetGroup, LoadBalancer

RuleEvaluations

The number of rules processed by the load balancer given a request rate averaged over an hour.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

TargetConnectionErrorCount

The number of connections that were not successfully established between the load balancer and target.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

TargetResponseTime

The time elapsed, in seconds, after the request leaves the load balancer until a response from the target is received. This is equivalent to the target_processing_time field in the access logs.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistics are Average and pNN.NN (percentiles).

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

TargetTLSNegotiationErrorCount

The number of TLS connections initiated by the load balancer that did not establish a session with the target. Possible causes include a mismatch of ciphers or protocols.

Reporting criteria: There is a nonzero value

Statistics: The most useful statistic is Sum.

Dimensions

  • LoadBalancer

  • AvailabilityZone, LoadBalancer

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

UnHealthyHostCount

The number of targets that are considered unhealthy.

Reporting criteria: Always reported

Statistics: The most useful statistics are Average, Minimum, and Maximum.

Dimensions

  • TargetGroup, LoadBalancer

  • TargetGroup, AvailabilityZone, LoadBalancer

Metric Dimensions for Application Load Balancers

To filter the metrics for your Application Load Balancer, use the following dimensions.

Dimension Description
AvailabilityZone

Filter the metric data by Availability Zone.

LoadBalancer

Filter the metric data by load balancer. Specify the load balancer as follows: app/load-balancer-name/1234567890123456 (the final portion of the load balancer ARN).

TargetGroup

Filter the metric data by target group. Specify the target group as follows: targetgroup/target-group-name/1234567890123456 (the final portion of the target group ARN).

Statistics for Application Load Balancer Metrics

CloudWatch provides statistics based on the metric data points published by Elastic Load Balancing. Statistics are metric data aggregations over specified period of time. When you request statistics, the returned data stream is identified by the metric name and dimension. A dimension is a name/value pair that uniquely identifies a metric. For example, you can request statistics for all the healthy EC2 instances behind a load balancer launched in a specific Availability Zone.

The Minimum and Maximum statistics reflect the minimum and maximum reported by the individual load balancer nodes. For example, suppose there are 2 load balancer nodes. One node has HealthyHostCount with a Minimum of 2, a Maximum of 10, and an Average of 6, while the other node has HealthyHostCount with a Minimum of 1, a Maximum of 5, and an Average of 3. Therefore, the load balancer has a Minimum of 1, a Maximum of 10, and an Average of about 4.

The Sum statistic is the aggregate value across all load balancer nodes. Because metrics include multiple reports per period, Sum is only applicable to metrics that are aggregated across all load balancer nodes.

The SampleCount statistic is the number of samples measured. Because metrics are gathered based on sampling intervals and events, this statistic is typically not useful. For example, with HealthyHostCount, SampleCount is based on the number of samples that each load balancer node reports, not the number of healthy hosts.

A percentile indicates the relative standing of a value in a data set. You can specify any percentile, using up to two decimal places (for example, p95.45). For example, the 95th percentile means that 95 percent of the data is below this value and 5 percent is above. Percentiles are often used to isolate anomalies. For example, suppose that an application serves the majority of requests from a cache in 1-2 ms, but in 100-200 ms if the cache is empty. The maximum reflects the slowest case, around 200 ms. The average doesn't indicate the distribution of the data. Percentiles provide a more meaningful view of the application's performance. By using the 99th percentile as an Auto Scaling trigger or a CloudWatch alarm, you can target that no more than 1 percent of requests take longer than 2 ms to process.

View CloudWatch Metrics for Your Load Balancer

You can view the CloudWatch metrics for your load balancers using the Amazon EC2 console. These metrics are displayed as monitoring graphs. The monitoring graphs show data points if the load balancer is active and receiving requests.

Alternatively, you can view metrics for your load balancer using the CloudWatch console.

To view metrics using the Amazon EC2 console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. To view metrics filtered by target group, do the following:

    1. In the navigation pane, choose Target Groups.

    2. Select your target group, and then choose the Monitoring tab.

    3. (Optional) To filter the results by time, select a time range from Showing data for.

    4. To get a larger view of a single metric, select its graph.

  3. To view metrics filtered by load balancer, do the following:

    1. In the navigation pane, choose Load Balancers.

    2. Select your load balancer, and then choose the Monitoring tab.

    3. (Optional) To filter the results by time, select a time range from Showing data for.

    4. To get a larger view of a single metric, select its graph.

To view metrics using the CloudWatch console

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Metrics.

  3. Select the ApplicationELB namespace.

  4. (Optional) To view a metric across all dimensions, type its name in the search field.

  5. (Optional) To filter by dimension, select one of the following:

    • To display only the metrics reported for your load balancers, choose Per AppELB Metrics. To view the metrics for a single load balancer, type its name in the search field.

    • To display only the metrics reported for your target groups, choose Per AppELB, per TG Metrics. To view the metrics for a single target group, type its name in the search field.

    • To display only the metrics reported for your load balancers by Availability Zone, choose Per AppELB, per AZ Metrics. To view the metrics for a single load balancer, type its name in the search field. To view the metrics for a single Availability Zone, type its name in the search field.

    • To display only the metrics reported for your load balancers by Availability Zone and target group, choose Per AppELB, per AZ, per TG Metrics. To view the metrics for a single load balancer, type its name in the search field. To view the metrics for a single target group, type its name in the search field. To view the metrics for a single Availability Zone, type its name in the search field.

To view metrics using the AWS CLI

Use the following list-metrics command to list the available metrics:

Copy
aws cloudwatch list-metrics --namespace AWS/ApplicationELB

To get the statistics for a metric using the AWS CLI

Use the following get-metric-statistics command get statistics for the specified metric and dimension. Note that CloudWatch treats each unique combination of dimensions as a separate metric. You can't retrieve statistics using combinations of dimensions that were not specially published. You must specify the same dimensions that were used when the metrics were created.

Copy
aws cloudwatch get-metric-statistics --namespace AWS/ApplicationELB \ --metric-name UnHealthyHostCount --statistics Average --period 3600 \ --dimensions Name=LoadBalancer,Value=app/my-load-balancer/50dc6c495c0c9188 \ Name=TargetGroup,Value=targetgroup/my-targets/73e2d6bc24d8a067 \ --start-time 2016-04-18T00:00:00Z --end-time 2016-04-21T00:00:00Z

The following is example output:

{
    "Datapoints": [
        {
            "Timestamp": "2016-04-18T22:00:00Z",
            "Average": 0.0,
            "Unit": "Count"
        },
        {
            "Timestamp": "2016-04-18T04:00:00Z",
            "Average": 0.0,
            "Unit": "Count"
        },
        ...
    ],
    "Label": "UnHealthyHostCount"
}