

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon VPC Lattice 的 CloudWatch 指標
<a name="monitoring-cloudwatch"></a>

Amazon VPC Lattice 會將與目標群組和服務相關的資料傳送至 Amazon CloudWatch，並將其處理為可讀且幾近即時的指標。這些指標會保留 15 個月，讓您可以存取歷史資訊，並更清楚 Web 應用程式或服務的效能。您也可以設定警報監看特定閾值，在達到閾值發出通知或採取動作。如需更多資訊，請參閱 [Amazon CloudWatch 使用者指南](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)。

Amazon VPC Lattice 會在您的帳戶中使用服務連結角色 AWS ，將指標傳送至 Amazon CloudWatch。如需詳細資訊，請參閱[使用 Amazon VPC Lattice 的服務連結角色](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>

您可以使用 Amazon CloudWatch CloudWatch 指標 AWS CLI。

**使用 CloudWatch 主控台檢視指標**

1. 在 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 開啟 Amazon CloudWatch 主控台。

1. 在導覽窗格中，選擇 **指標**。

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

1. (選用) 若要檢視所有維度的指標，請在搜尋欄位中輸入其名稱。

1. (選用) 若要根據維度來篩選，請選取下列其中一項：
   + 若要僅顯示目標群組報告的指標，請選擇**目標群組**。若要檢視單一目標群組的指標，請在搜尋欄位中輸入其名稱。
   + 若要僅顯示針對您的服務報告的指標，請選擇**服務**。若要檢視單一服務的指標，請在搜尋欄位中輸入其名稱。

**使用 檢視指標 AWS CLI**

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

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

如需每個指標及其維度的資訊，請參閱 [目標群組指標](#monitoring-cloudwatch-tg)和 [服務指標](#monitoring-cloudwatch-service)。

## 目標群組指標
<a name="monitoring-cloudwatch-tg"></a>

VPC Lattice 會自動將與目標群組相關的指標存放在 Amazon CloudWatch `AWS/VpcLattice` 命名空間中。 [Amazon CloudWatch ](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) 如需目標群組的詳細資訊，請參閱 [VPC Lattice 中的目標群組](target-groups.md)。

**維度**

若要篩選目標群組的指標，請使用下列維度：
+ `AvailabilityZone`
+ `TargetGroup`


| 指標 | Description | TargetGroup 通訊協定 | 
| --- | --- | --- | 
|  TotalConnectionCount  |  連線總數。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  ConnectionTimeoutCount  |  連線連線逾時總計。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  ActiveRequestCount  |  作用中請求總數。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS  | 
|  RequestTime  |  請求到最後一個位元組的時間，以毫秒為單位。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  |  HTTP, HTTPS, TCP  | 

## 服務指標
<a name="monitoring-cloudwatch-service"></a>

VPC Lattice 會自動將與服務相關的指標存放在 Amazon CloudWatch `AWS/VpcLattice` 命名空間中。 [Amazon CloudWatch ](https://docs.aws.amazon.com//AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) 如需 服務的詳細資訊，請參閱 [VPC Lattice 中的服務](services.md)。

**維度**

若要篩選目標群組的指標，請使用下列維度：
+ `AvailabilityZone`
+ `Service`


| 指標 | Description | 
| --- | --- | 
|  RequestTimeoutCount  |  等待回應逾時的請求總數。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 
|  TotalRequestCount  |  請求總數。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 
|  RequestTime  |  請求時間，以毫秒為單位。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/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_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/vpc-lattice/latest/ug/monitoring-cloudwatch.html)  | 