

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

# 監控 Amazon EventBridge
<a name="eb-monitoring"></a>

EventBridge 會每分鐘針對所有項目傳送指標至 Amazon CloudWatch，從符合的[事件](eb-events.md)數量到[規則](eb-rules.md)調用[目標](eb-targets.md)的次數。

 下列影片檢閱透過 CloudWatch 監控和稽核 EventBridge 的行為：




**CloudWatch 指標盡力交付**  
CloudWatch 指標是盡力交付。大多數 EventBridge 操作會導致資料點傳送至 CloudWatch。不保證指標的完成程度與時間先後順序。指定分鐘的資料點可能會在透過 CloudWatch 提供之前延遲，或者完全無法交付。CloudWatch 指標可讓您近乎即時地了解活動的性質。它們並非所有操作的完整會計。

**Topics**
+ [EventBridge 指標](#eb-metrics)
+ [EventBridge 指標的維度](#eb-metrics-dimensions)
+ [在 Amazon EventBridge 中監控事件交付的最佳實務](eb-monitoring-events-best-practices.md)
+ [EventBridge 是 Amazon CloudWatch Events 的新版本。](eb-cwe-now-eb.md)

## EventBridge 指標
<a name="eb-metrics"></a>

`AWS/Events` 命名空間包含下列指標。

對於使用計數做為單位的指標，總和與 SampleCount 傾向於是最有用的統計資訊。

僅指定`RuleName`維度的指標是指預設事件匯流排。指定 `EventBusName`和 `RuleName`維度的指標會參考自訂事件匯流排。


| 指標 | 說明 | 維度 | 單位 | 
| --- | --- | --- | --- | 
|  DeadLetterInvocations  | 規則目標未被調用以對事件進行回應時的次數。這包含會再次運行相同規則、導致無限迴圈的調用。 | RuleName | 計數 | 
|  Events  | EventBridge 所擷取的合作夥伴事件數目。 | EventSourceName | 計數 | 
|  FailedInvocations  | 永久失敗的調用次數。這不包括重試或嘗試重試後成功的調用。它亦不會將計入 `DeadLetterInvocations` 的失敗調用列入計算。 僅有此指標不是零時，EventBridge 才會將它傳送至 CloudWatch。  | RuleName | 計數 | 
|  Invocations  | 規則回應事件時調用目標的次數。這包含成功與失敗的調用，但不包含永久失敗前的節流或重試嘗試。它不包括 `DeadLetterInvocations`。 僅有此指標不是零時，EventBridge 才會將它傳送至 CloudWatch。  | 無，RuleName | 計數 | 
| InvocationAttempts | EventBridge 嘗試調用目標的次數。 | EventBusName、None、RuleName | 計數 | 
|  InvocationsCreated  | 為回應每個事件而建立的調用總數。<br />此指标通常用來監督每秒 [EventBridge service quota](eb-quota.md#eb-limits) 交易中**調用節流限制**的使用率。 | 無 | 計數 | 
|  InvocationsFailedToBeSentToDlq  | 無法移至無效字母佇列的調用數量。無效字母佇列錯誤可能因許可錯誤、設定錯誤的資源或大小限制而發生。 僅有此指標不是零時，EventBridge 才會將它傳送至 CloudWatch。  | RuleName | 計數 | 
|  IngestiontoInvocationCompleteLatency  | 從事件擷取到完成第一次調用嘗試所花費的時間。 | EventBusName、None、RuleName | 毫秒 | 
| IngestionToInvocationSuccessLatency | 從事件擷取到成功目標交付所花費的時間，使用呼叫結束時間做為截止。<br />只有在第一次成功交付嘗試到目標之後，才會發出此指標。 | EventBusName、None、RuleName | 毫秒 | 
|  IngestiontoInvocationStartLatency  | 處理事件的時間，從 EventBridge 擷取事件到目標的第一次調用开始計算。 | EventBusName、None、RuleName | 毫秒 | 
|  InvocationsSentToDlq  | 移至無效字母佇列的調用數目。 僅有此指標不是零時，EventBridge 才會將它傳送至 CloudWatch。  | RuleName | 計數 | 
|  MatchedEvents  | 如果指定了「EventBusName」或「EventSourceName」，則表示與任何規則相符的事件數目。如果指定了 RuleName，則為與特定規則相符的事件數目。 | EventBusName、EventSourceName、RuleName | 計數 | 
| RetryInvocationAttempts | 重試目標調用的次數。僅有此指標不是零時，EventBridge 才會將它傳送至 CloudWatch。 | EventBusName、None、RuleName | 計數 | 
| SuccessfulInvocationAttempts | 成功調用目標的次數。 | EventBusName、None、RuleName | 計數 | 
|  ThrottledRules  | 規則執行限流的次數。這些規則的調用可能會延遲。<br />如需詳細資訊，請參閱 [EventBridge 事件匯流排配額](eb-quota.md#eb-limits) 中**每秒交易的調用限流**。 | EventBusName、None、RuleName | 計數 | 
|  TriggeredRules  | 已執行並符合任何事件的規則數目。<br />在觸發規則之前，您不會在 CloudWatch 中看到此指標。 | EventBusName、None、RuleName | 計數 | 
|  EventBusEncryptionStarted  | 事件匯流排的重新加密操作已開始的次數。更新事件匯流排組態會觸發重新加密由 EventBridge 存放的靜態組態。 | EventBusName | 計數 | 
|  EventBusEncryptionCompleted  | 事件匯流排重新加密操作成功完成的次數。更新事件匯流排組態會觸發重新加密由 EventBridge 存放的靜態組態。 | EventBusName | 計數 | 
|  EventBusEncryptionFailed  | 事件匯流排重新加密操作失敗的次數。更新事件匯流排組態會觸發重新加密由 EventBridge 存放的靜態組態。 僅有此指標不是零時，EventBridge 才會將它傳送至 CloudWatch。  | EventBusName | 計數 | 

### EventBridge PutEvents 指标
<a name="eb-metrics-putevents"></a>

`AWS/Events` 命名空間包含有關 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` API 請求的下列要求指標。

對於使用計數做為單位的指標，總和與 SampleCount 傾向於是最有用的統計資訊。


| 指標 | 說明 | 維度 | 單位 | 
| --- | --- | --- | --- | 
| PutEventsApproximateCallCount | 收到的 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求的大約數目。 | 無 | 計數 | 
|  PutEventsApproximateFailedCount  | 失敗的 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求的大約數目。 | 無 | 計數 | 
|  PutEventsApproximateSuccessCount  | 成功的 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求的大約數目。 | 無 | 計數 | 
|  PutEventsApproximateThrottledCount  | 因限流而拒絕的 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求的數目。 | 無 | 計數 | 
| PutEventsEntriesCount | `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求中包含的事件項目數目。 | 無 | 計數 | 
| PutEventsFailedEntriesCount | 無法擷取之 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求中包含的事件項目數目。 | 無 | 計數 | 
|  PutEventsLatency  | 每個 `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求所花費的時間。 | 無 | 毫秒 | 
|  PutEventsRequestSize  | `[PutEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html)` 請求的大小。 | 無 | 位元組 | 

### EventBridge PutPartnerEvents 指標
<a name="eb-metrics-putpartnerevents"></a>

`AWS/Events` 命名空間包含有關 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` API 請求的下列要求指標。

**注意**  
EventBridge 僅包含與傳送事件的 SaaS 合作夥伴帳戶中的 [PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html) 請求相關的指標。如需詳細資訊，請參閱[透過 Amazon EventBridge 從 SaaS 合作夥伴接收事件](eb-saas.md)

對於使用計數做為單位的指標，總和與 SampleCount 傾向於是最有用的統計資訊。


| 指標 | 說明 | 維度 | 單位 | 
| --- | --- | --- | --- | 
| PutPartnerEventsApproximateCallCount | 收到的 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求的大約數目。 | 無 | 計數 | 
|  PutPartnerEventsApproximateFailedCount  | 失敗的 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求的大約數目。 | 無 | 計數 | 
|  PutPartnerEventsApproximateThrottledCount  | 因限流而拒絕的 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求的數目。 | 無 | 計數 | 
|  PutPartnerEventsApproximateSuccessCount  | 成功的 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求的大約數目。 | 無 | 計數 | 
| PutPartnerEventsEntriesCount | `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求中包含的事件項目數目。 | 無 | 計數 | 
| PutPartnerEventsFailedEntriesCount | 無法擷取之 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求中包含的事件項目數目。 | 無 | 計數 | 
|  PutPartnerEventsLatency  | 每個 `[PutPartnerEvents](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutPartnerEvents.html)` 請求所花費的時間。 | 無 | 毫秒 | 

## EventBridge 指標的維度
<a name="eb-metrics-dimensions"></a>

EventBridge 指標具有*維度*或可排序屬性，如下所示。


|  維度  |  說明  | 
| --- | --- | 
|  EventBusName  | 依據事件匯流排名稱篩選可用的指標。 | 
|  EventSourceName  | 依據合作夥伴事件來源名稱篩選可用的指標。 | 
|  RuleName  | 依據規則名稱篩選可用的指標。 | 