

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

# CloudWatch 亚马逊 VPC Lattice 的指标
<a name="monitoring-cloudwatch"></a>

Amazon VPC Lattice 将与您的目标群体和服务相关的数据发送到亚马逊 CloudWatch，并将其处理为可读的近乎实时的指标。这些指标会保留 15 个月，使您能够访问历史信息，并更好地了解您的 Web 应用程序或服务的执行情况。此外，可以设置用于监测特定阈值的警报，并在达到相应阈值时发送通知或执行操作。有关更多信息，请参阅 [Amazon CloudWatch 用户指南](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)。

Amazon VPC Lattice 使用您 AWS 账户中的服务相关角色向亚马逊发送指标。 CloudWatch有关更多信息，请参阅 [使用适用于 Amazon VPC 莱迪思的服务相关角色](using-service-linked-roles.md)。

**Topics**
+ [查看 Amazon CloudWatch 指标](#monitoring-cloudwatch-view)
+ [目标组指标](#monitoring-cloudwatch-tg)
+ [服务指标](#monitoring-cloudwatch-service)

## 查看 Amazon CloudWatch 指标
<a name="monitoring-cloudwatch-view"></a>

您可以使用 CloudWatch 控制台或查看目标群体和服务的Amazon CloudWatch 指标 AWS CLI。

**使用 CloudWatch 控制台查看指标**

1. 打开 Amazon CloudWatch 控制台，网址为[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)。

1. 在导航窗格中，选择**指标**。

1. 选择 `AWS/VpcLattice` 命名空间。

1. （可选）要跨所有维度查看某个指标，请在搜索字段中输入其名称。

1. (可选) 要按维度筛选，请选择下列选项之一：
   + 要仅显示为目标组报告的指标，请选择**目标组**。要查看单个目标组的指标，请在搜索字段中输入其名称。
   + 要仅显示为服务报告的指标，请选择**服务**。要查看单个服务的指标，请在搜索字段中输入其名称。

**要查看指标，请使用 AWS CLI**

使用以下 [CloudWatch list-Metrics AWS CLI 命令列出可用指标](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/list-metrics.html)：

`aws cloudwatch list-metrics --namespace AWS/VpcLattice`

有关每个指标及其维度的信息，请参阅 [目标组指标](#monitoring-cloudwatch-tg) 和 [服务指标](#monitoring-cloudwatch-service)。

## 目标组指标
<a name="monitoring-cloudwatch-tg"></a>

VPC Lattice 会自动将与目标群体相关的指标存储在 `AWS/VpcLattice` [Amazon CloudWatch 命名空间](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace)中。有关目标组的更多信息，请参阅 [VPC Lattice 中的目标组](target-groups.md)。

**Dimensions**

要筛选目标群体的指标，请使用以下维度：
+ `AvailabilityZone`
+ `TargetGroup`


| 指标 | 说明 | TargetGroup 协议 | 
| --- | --- | --- | 
|  TotalConnectionCount  |  连接总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  ActiveConnectionCount  |  活动连接数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  ConnectionErrorCount  |  连接失败总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  HTTP1\$1ConnectionCount  |  HTTP/1.1 连接总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  HTTP2\$1ConnectionCount  |  HTTP/2 连接总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  ConnectionTimeoutCount  |  连接的连接超时总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  TotalReceivedConnectionBytes  |  接收的连接字节总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  TotalSentConnectionBytes  |  发送的连接字节总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  TotalRequestCount  |  请求总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  ActiveRequestCount  |  活动请求总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  RequestTime  |  最后一个字节的请求时间（以毫秒为单位）。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  HTTPCode\$12XX\$1Count, HTTPCode\$13XX\$1Count, HTTPCode\$14XX\$1Count, HTTPCode\$15XX\$1Count  |  聚合 HTTP 响应代码。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  TLSConnectionErrorCount  |  TLS 连接错误总数，不包括失败的证书验证。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 
|  TotalTLSConnectionHandshakeCount  |  成功的 TLS 连接握手总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 

## 服务指标
<a name="monitoring-cloudwatch-service"></a>

VPC Lattice 会自动将与服务相关的指标存储在 `AWS/VpcLattice` [Amazon CloudWatch 命名空间](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace)中。有关服务的更多信息，请参阅 [VPC Lattice 中的服务](services.md)。

**Dimensions**

要筛选目标群体的指标，请使用以下维度：
+ `AvailabilityZone`
+ `Service`


| 指标 | 说明 | 
| --- | --- | 
|  RequestTimeoutCount  |  等待响应超时的请求总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 
|  TotalRequestCount  |  请求总数。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 
|  RequestTime  |  请求时间（毫秒）。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 
|  HTTPCode\$12XX\$1Count, HTTPCode\$13XX\$1Count, HTTPCode\$14XX\$1Count, HTTPCode\$15XX\$1Count  |  聚合 HTTP 响应代码。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 