

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

# 從 CloudWatch 擷取 Amazon SES 事件資料
<a name="event-publishing-retrieving-cloudwatch"></a>

Amazon SES 可以將電子郵件傳送事件的指標發佈到 Amazon CloudWatch。發佈事件資料至 CloudWatch 時，CloudWatch 會以時間序列資料形式提供這些指標。您可以使用這些指標來監控電子郵件的傳送效能。例如，您可以監控投訴指標並設定 CloudWatch 警示，以在超過特定值時觸發警示。

Amazon SES 可以透過兩個層級的精細程度將這些事件發佈至 CloudWatch：
+ **跨 AWS 帳戶**- 這些粗略指標對應至您使用 Amazon SES 主控台和 `GetSendStatistics` API 監控的指標，是整個 的總計 AWS 帳戶。Amazon SES 會自動將這些指標發佈到 CloudWatch。
+ **精細** - 這些指標根據您使用*訊息標籤*定義的電子郵件特性進行分類。若要將這些指標發佈至 CloudWatch，您必須使用 CloudWatch 事件目的地來[設定事件發佈](monitor-sending-using-event-publishing-setup.md)，並在傳送電子郵件時[指定組態集](event-publishing-send-email.md)。您也可以指定訊息標籤，或使用 Amazon SES 自動提供的[自動標籤](monitor-using-event-publishing.md#event-publishing-how-works)。

本節說明可用的指標，以及如何查看 CloudWatch 中的指標。

## 可用的指標
<a name="event-publishing-retrieving-cloudwatch-metrics"></a>

您可以將下列 Amazon SES 電子郵件傳送指標發佈至 CloudWatch：
+ **Send (傳送)** - 傳送請求成功，且 Amazon SES 會嘗試將訊息遞送到收件人的電子郵件伺服器。(如果正在使用帳戶層級或全域禁止，SES 仍會將其視為傳送，但會禁止遞送)。
+ **轉譯失敗** – 因範本轉譯問題而未傳送電子郵件。範本資料遺失或是範本參數與資料不相符時，可能會出現此事件類型。(只有使用 [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendTemplatedEmail.html) 或 [https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html](https://docs.aws.amazon.com/ses/latest/APIReference/API_SendBulkTemplatedEmail.html) API 操作來傳送電子郵件時，才會出現此事件類型。)
+ **Reject (拒絕)** - Amazon SES 接受電子郵件後判斷電子郵件包含病毒，且未嘗試將電子郵件遞送到收件人的電子郵件伺服器。
+ **Delivery (交付)** – Amazon SES 成功將電子郵件交付給收件人的郵件伺服器。
+ **退信** – *硬退信*代表收件人的郵件伺服器永久拒絕電子郵件。（只有在 SES 不再嘗試傳送電子郵件時，才會包含*軟退信*。 一般而言，這些軟退信表示交付失敗，但在某些情況下，即使郵件成功到達收件人收件匣，也可以傳回軟退信。 這通常發生在收件人傳送out-of-office的自動回覆時。 在此 [AWS re：Post 文章](https://repost.aws/knowledge-center/ses-understand-soft-bounces)中進一步了解軟退信。)
+ **Complaint (投訴)** - 電子郵件已成功遞送至收件人的郵件伺服器，但收件人將其標示為垃圾郵件。
+ **交付延遲** – 因為發生暫時問題，所以無法將電子郵件遞送至收件人的郵件伺服器。例如，當收件人的收件匣已滿時，或接收電子郵件伺服器暫時發生問題時，可能會發生傳遞延遲。
+ **Subscription (訂閱)** - 已成功遞送電子郵件，但收件人透過按一下電子郵件標頭中的 `List-Unsubscribe` 或頁尾中的 `Unsubscribe` 連結來更新訂閱偏好設定。
+ **Open (開啟)** - 收件人收到訊息，並在其電子郵件用戶端中開啟。
+ **Click (點按)** - 收件人點按電子郵件中包含的一或多個連結。

## 可用的維度
<a name="event-publishing-retrieving-cloudwatch-dimensions"></a>

將 CloudWatch 事件目的地新增至 Amazon SES 中的組態集時，CloudWatch 會使用您指定的維度名稱。如需詳細資訊，請參閱[設定事件發佈的 CloudWatch 事件目的地](event-publishing-add-event-destination-cloudwatch.md)。

## 在 CloudWatch 主控台中檢視 Amazon SES 指標
<a name="event-publishing-retrieving-cloudwatch-console"></a>

下列程序說明如何使用 CloudWatch 主控台來檢視 Amazon SES 事件發佈指標。

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

1. 登入 AWS 管理主控台 並開啟位於 https：//[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 的 CloudWatch 主控台。

1. 如有必要請變更區域。從導覽列中，選取 AWS 資源所在的區域。如需詳細資訊，請參閱 [ 區域與端點](https://docs.aws.amazon.com/general/latest/gr/rande.html)。

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

1. 在**指標**窗格中，選取 **SES**。

1. 選取您想要檢視的指標。若要檢視精細的[事件發佈指標](monitor-using-event-publishing.md)，請選擇您在[設定 CloudWatch 事件目的地](event-publishing-add-event-destination-cloudwatch.md)時指定的維度組合。若要進一步了解使用 CloudWatch 檢視度量，請參閱[使用 Amazon CloudWatch 指標](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html)。

**使用 檢視指標 AWS CLI**
+ 在命令提示中，使用下列命令：

  ```
  1. aws cloudwatch list-metrics --namespace "AWS/SES"
  ```