

# Amazon CloudWatch を使用した Aurora DSQL のモニタリング
<a name="cloudwatch-monitoring"></a>

raw データを収集し、読み取り可能なほぼリアルタイムのメトリクスを処理する CloudWatch を使用して Aurora DSQL をモニタリングします。CloudWatch はこれらの統計を 15 か月間保持するため、ウェブアプリケーションやサービスパフォーマンスをより適切に把握できます。アラームを設定して特定のしきい値を監視し、通知を送信したり、しきい値に達したときにアクションを実行したりします。Aurora DSQL で利用できる使用状況とオブザーバビリティのメトリクスを以下で確認してください。

詳細については、「[Amazon CloudWatch ユーザーガイド](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/)」を参照してください。

## オブザーバビリティとパフォーマンス
<a name="observability-performance"></a>

この表は、Aurora DSQL のオブザーバビリティメトリクスの概要を示しています。これには、読み取り専用トランザクションと合計トランザクションを追跡するためのメトリクスが含まれており、全体的なワークロードの特性を提供します。クエリタイムアウトや OCC 競合率などの実用的なメトリクスは、パフォーマンスの問題や同時実行の競合を特定するのに役立ちます。セッション関連のメトリクスは、アクティブと合計の両方で、システムの現在の負荷に関するインサイトを提供します。


| CloudWatch メトリクス名 | メトリクス | 単位 | 説明 | 
| --- |--- |--- |--- |
| ReadOnlyTransactions | Read-only transactions | none | The number of read-only transactions | 
| TotalTransactions | Total transactions | none | The total number of transactions executed on the system, including read-only transactions. | 
| QueryTimeouts | Query timeouts | none | The number of queries which have timed out due to hitting the maximum transaction time | 
| OccConflicts | OCC conflicts | none | The number of transactions aborted due to key level OCC | 
| CommitLatency | Commit Latency | milliseconds | Time spent by commit phase of query execution (P50) | 
| BytesWritten | Bytes Written | bytes | Bytes written to storage | 
| BytesRead | Bytes Read | bytes | Bytes read from storage | 
| ComputeTime | QP compute time | milliseconds | QP wall clock time | 
| ClusterStorageSize | Cluster Storage Size | bytes | Cluster size | 

## 使用状況メトリクス
<a name="usage-metrics"></a>

 Aurora DSQL は、分散処理ユニット (DPU) と呼ばれる単一の正規化された請求ユニットを使用して、クエリ処理、読み取り、書き込みなど、すべてのリクエストベースのアクティビティを測定します。


| CloudWatch メトリクス名 | メトリクス | ディメンション: ResourceId | Unit | 説明 | 
| --- |--- |--- |--- |--- |
| WriteDPU | Write Units | <cluster-id> | DPU | Approximates the write active-use component of your Aurora DSQL cluster DPU usage. | 
| MultiRegionWriteDPU | Multi-Region Write Units | <cluster-id> | DPU | Applicable for Multi-Region clusters: Approximates the multi-Region write active-use component of your Aurora DSQL cluster DPU usage. | 
| ReadDPU | Read Units | <cluster-id> | DPU | Approximates the read active-use component of your Aurora DSQL cluster DPU usage. | 
| ComputeDPU | Compute Units | <cluster-id> | DPU | Approximates the compute active-use component of your Aurora DSQL cluster DPU usage. | 
| TotalDPU | Total Units | <cluster-id> | DPU | Approximates the total active-use component of your Aurora DSQL cluster DPU usage. | 

## CDC ストリームメトリクス
<a name="cdc-stream-metrics"></a>

Aurora DSQL は、変更データキャプチャ (CDC) ストリームについて次のメトリクスを発行します。これらのメトリクスは `ClusterId` および `StreamId` ディメンションを使用するため、各 CDC ストリームを個別にモニタリングできます。CDC ストリームの詳細については、「[変更データキャプチャ (CDC) ストリーム](https://docs.aws.amazon.com/aurora-dsql/latest/userguide/cdc-streams.html)」を参照してください。


| CloudWatch メトリクス名 | メトリクス | 単位 | Description | 
| --- |--- |--- |--- |
| IsImpaired | Is impaired | none | Indicates whether the stream is impaired. The value is 1 when the stream is in the IMPAIRED state, and 0 when the stream is healthy. Use this metric to create a CloudWatch alarm that notifies you when a stream becomes impaired. | 
| PublishedBytes | Published bytes | bytes | The total number of bytes that Aurora DSQL wrote to the target Kinesis data stream. | 
| PublishedRecords | Published records | none | The number of CDC records that Aurora DSQL wrote to the target Kinesis data stream. | 
| BehindSourceLag | Behind source lag | milliseconds | The delay, in milliseconds, between when a transaction commits in Aurora DSQL and when the CDC system processes the resulting record. A rising value indicates that the CDC pipeline is falling behind the write workload. If lag grows beyond the failure threshold, the stream transitions to FAILED. | 
| BytesStreamed | Bytes streamed | bytes | The total bytes streamed through the CDC pipeline for billing purposes. This metric reflects the data volume used to calculate streaming charges. | 
| StreamDPU | Stream DPU | DPU | The Distributed Processing Units (DPU) consumed by the CDC stream. This metric reflects the processing cost of streaming change data. | 