

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Amazon CloudWatch 指标
<a name="UsingCloudWatchConsole-common"></a>

您可以使用 AWS 管理控制台 或 CloudWatch API 获取网关的监控数据。控制台根据来自 CloudWatch API 的原始数据显示一系列图表。您也可以通过[AWS 软件开发套件 (SDKs)](https://aws.amazon.com/tools) 或[亚马逊 CloudWatch API 工具使用 API](https://aws.amazon.com/cloudwatch)。 CloudWatch 根据您的需求差异，您可能倾向于使用控制台中显示的图表，也可能倾向于检索自 API 的图表。

无论选择何种方法使用指标，您都必须指定下列信息：
+ 要使用的指标维度。*维度* 是帮助您对某指标进行唯一标识的名称/值对。Storage Gateway 的维度为 `GatewayId`、`GatewayName` 和 `VolumeId`。在 CloudWatch 控制台中，您可以使用`Gateway Metrics`和`Volume Metrics`视图轻松选择特定于网关的维度和特定于卷的维度。有关尺寸的更多信息，请参阅 *Amazon CloudWatch 用户指南*中的[尺寸](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Dimension)。
+ 指标名称，如 `ReadBytes`。

下表总结了您可使用的 Storage Gateway 指标数据的类型。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/storagegateway/latest/vgw/UsingCloudWatchConsole-common.html)

网关和卷指标的使用方式类似于其他服务指标。您可以在下面所列的 CloudWatch 文档中找到一个有关某些最常见的指标任务的讨论：
+ [查看可用指标](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html)
+ [获取指标的数据](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/US_GetStatistics.html)
+ [创建 CloudWatch 警报](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html)