

# Monitorar o Aurora DSQL com o Amazon CloudWatch
<a name="cloudwatch-monitoring"></a>

Monitorar o Aurora DSQL usando o CloudWatch, que coleta dados brutos e os processa em métricas legíveis praticamente em tempo real. O CloudWatch mantém essas estatísticas por 15 meses para ajudar você a ter uma visão melhor do desempenho de sua aplicação ou serviço da web. Defina alarmes para monitorar limites específicos e enviar notificações ou realizar ações quando eles são atingidos. Analise abaixo as métricas de uso e observabilidade disponíveis para o Aurora DSQL.

Para saber mais, consulte o [Guia do usuário do Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/). 

## Observabilidade e desempenho
<a name="observability-performance"></a>

Esta tabela descreve as métricas de observabilidade do Aurora DSQL. Ela inclui métricas para rastrear transações somente leitura e o total de transações e oferecer uma caracterização geral da workload. Métricas práticas, como tempos limite de consulta e taxa de conflito de OCC, estão incluídas para ajudar a identificar problemas de desempenho e conflitos de simultaneidade. As métricas relacionadas a sessões, tanto ativas quanto totais, oferecem informações sobre a carga atual no sistema.


| Nome da métrica do CloudWatch | Métrica | Unidade | Descrição | 
| --- |--- |--- |--- |
| 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 | 

## Métricas de uso
<a name="usage-metrics"></a>

 O Aurora DSQL mede todas as atividades baseadas em solicitações, como processamento de consultas, leituras e gravações, usando uma única unidade de cobrança normalizada chamada unidade de processamento distribuído (DPU). 


| Nome da métrica do CloudWatch | Métrica | Dimensão: ResourceId | Unidade | Descrição | 
| --- |--- |--- |--- |--- |
| 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. | 

## Métricas de fluxo de CDC
<a name="cdc-stream-metrics"></a>

O Aurora DSQL publica as seguintes métricas para fluxos de captura de dados de alteração (CDC). Essas métricas usam as dimensões `ClusterId` e `StreamId`, portanto, você pode monitorar cada fluxo do CDC de forma independente. Para obter mais informações sobre fluxos de CDC, consulte [Fluxos de captura de dados de alteração (CDC)](https://docs.aws.amazon.com/aurora-dsql/latest/userguide/cdc-streams.html).


| Nome da métrica do CloudWatch | Métrica | Unidade | Descrição | 
| --- |--- |--- |--- |
| 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. | 