

# 使用 Amazon CloudWatch 指标监控 REST API 执行
<a name="monitoring-cloudwatch"></a>

您可以使用 CloudWatch 监控 API 执行，这将从 API Gateway 收集原始数据，并将数据处理为便于阅读的近乎实时的指标。这些统计数据会保存 15 个月，从而使您能够访问历史信息，并能够更好地了解您的 Web 应用程序或服务的执行情况。默认情况下，API Gateway 指标数据会在一分钟时段内自动发送到 CloudWatch。有关更多信息，请参阅 *Amazon CloudWatch 用户指南* 中的[什么是 Amazon CloudWatch？](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)

您可以通过多种方式分析 API Gateway 报告的指标所提供的信息。下面的列表显示了指标的一些常见用法，这些内容是帮助您开始使用的建议：
+ 监控 **IntegrationLatency** 指标以衡量后端的响应能力。
+ 监控 **Latency** 指标以衡量 API 调用的整体响应能力。
+ 监控 **CacheHitCount** 和 **CacheMissCount** 指标以优化缓存容量，从而实现所需的性能。

**Topics**
+ [Amazon API Gateway 维度和指标](api-gateway-metrics-and-dimensions.md)
+ [使用 API Gateway 中的 API 控制面板查看 CloudWatch 指标](how-to-api-dashboard.md)
+ [在 CloudWatch 控制台中查看 API Gateway 指标](metrics_dimensions_view_in_cloud_watch.md)
+ [在 CloudWatch 控制台中查看 API Gateway 日志事件](view-cloudwatch-log-events-in-cloudwatch-console.md)
+ [AWS 中的 API Gateway 监控工具](monitoring_automated_manual.md)