You can use Amazon CloudWatch to monitor AWS Global Accelerator metrics in real-time effectively by leveraging the built-in metrics that Global Accelerator automatically publishes to CloudWatch without any additional setup. Here is a detailed guide on how to do this:
1. Accessing Global Accelerator Metrics in CloudWatch
- All Global Accelerator metrics are available under the CloudWatch namespace `AWS/GlobalAccelerator`.
- You must view these metrics in the US West (Oregon) Region (us-west-2) regardless of where your accelerator is deployed. This applies both to the AWS Management Console and AWS CLI commands[1][2].
2. Available Metrics
Global Accelerator provides several key metrics that help you monitor the health and traffic of your accelerators in real-time:
- ActiveFlowCount: Number of concurrent TCP and UDP connections from clients to endpoints.
- NewFlowCount: Number of new TCP and UDP flows established.
- ProcessedBytesIn / ProcessedBytesOut: Volume of incoming and outgoing traffic in bytes, including TCP/IP headers.
- PacketsProcessed: Total packets processed by the accelerator.
- HealthyEndpointCount / UnhealthyEndpointCount: Number of endpoints considered healthy or unhealthy based on automatic health checks.
- Flows_Dropped_No_Endpoint_Found: Number of dropped TCP IPv6 flows due to no available IPv6 endpoints.
- TCP_AGA_Reset_Count, TCP_Client_Reset_Count, TCP_Endpoint_Reset_Count: Metrics related to TCP connection resets, useful for troubleshooting connection issues[2].
3. Using Dimensions to Filter Metrics
You can filter and analyze metrics by various dimensions to get detailed insights:
- Accelerator: Filter by specific accelerator ID.
- Listener: Filter by listener ID.
- EndpointGroup: Filter by AWS Region of the endpoint group.
- SourceRegion and DestinationEdge: Filter by geographic source and destination of traffic.
- TransportProtocol: Filter by TCP or UDP.
- AcceleratorIPAddress: Filter by the static IP address assigned to the accelerator[2].
4. Viewing Metrics
- In the AWS Management Console, go to CloudWatch, select Metrics, and then choose the `AWS/GlobalAccelerator` namespace to view graphs and data points.
- Metrics update every 60 seconds but only when traffic is flowing through the accelerator.
- You can visualize traffic patterns, endpoint health, and connection resets in near real-time[1][2].
5. Setting Up Alarms
- You can create CloudWatch Alarms on any Global Accelerator metric to get notified when values exceed or fall below thresholds you define.
- For example, set alarms on `UnhealthyEndpointCount` to get alerts when endpoints become unhealthy or on `ActiveFlowCount` to monitor traffic spikes.
- Alarms can trigger notifications via SNS, Lambda functions, or other AWS services for automated responses[1][2].
6. Troubleshooting with Metrics
- Use metrics like `TCP_AGA_Reset_Count` and `TCP_Client_Reset_Count` to diagnose connection reset issues.
- Monitor `Flows_Dropped_No_Endpoint_Found` to detect misconfigurations with IPv6 endpoints.
- Check `HealthyEndpointCount` and `UnhealthyEndpointCount` to ensure your endpoints are reachable and performing as expected[2].
7. Using AWS CLI for Metrics
You can also retrieve metric statistics using AWS CLI with commands like:
bash
aws cloudwatch get-metric-statistics --namespace AWS/GlobalAccelerator \
--metric-name ProcessedBytesIn \
--region us-west-2 \
--statistics Sum --period 60 \
--dimensions Name=Accelerator,Value= Name=DestinationEdge,Value=NA \
--start-time --end-time
Replace ``, ``, and `` with your specific values to get detailed metric data over a time range[2].
By following these steps, you can monitor AWS Global Accelerator metrics in real-time using CloudWatch, enabling you to troubleshoot issues, analyze traffic, and maintain the health of your global applications efficiently.
Citations:
[1] https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.html
[2] https://docs.aws.amazon.com/global-accelerator/latest/dg/cloudwatch-monitoring.html
[3] https://docs.lightstep.com/integrations/aws-globalaccelerator
[4] http://docs.aws.haqm.com/global-accelerator/latest/dg/logging-and-monitoring.html
[5] https://repost.aws/questions/QUF2Ov11ZzQJykpweMAcZJ-Q/metrics-on-health-checks-data-throughput-etc
[6] https://middleware.io/blog/aws-cloudwatch-metrics-explained-how-to-monitor-and-optimize-your-cloud-resources/
[7] https://help.sumologic.com/docs/integrations/amazon-aws/aws-global-accelerator/
[8] https://www.reddit.com/r/aws/comments/1b29v1w/for_monitoring_aws_resources_in_real_time_is/