

# 查看 DAX 指标和维度
<a name="dax-metrics-dimensions-dax"></a>

 与 Amazon DynamoDB 交互时，向 Amazon CloudWatch 发送指标和维度。您可以按照以下步骤查看 DynamoDB Accelerator (DAX) 的指标。

**要查看指标（控制台）**

 指标的分组首先依据服务命名空间，然后依据每个命名空间内的各种维度组合。

1. 访问 [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/) 打开 CloudWatch 控制台。

1.  在导航窗格中，选择**指标**。

1.  选择 **DAX** 命名空间。

**查看指标 (AWS CLI)**
+  在命令提示符处，使用以下命令。

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

## DAX 指标与维度
<a name="dax-metrics-dimensions"></a>

 以下部分列出了 DAX 发送到 CloudWatch 的指标和维度。

### DAX 指标
<a name="dax-metrics"></a>

DAX 提供以下指标。仅当指标具有非零值时，DAX 才会将指标发送到 CloudWatch。

**注意**  
CloudWatch 每隔一分钟汇总一次以下 DAX 指标：  
`CPUUtilization`
`CacheMemoryUtilization`
`NetworkBytesIn`
`NetworkBytesOut`
`BaselineNetworkBytesInUtilization`
`BaselineNetworkBytesOutUtilization`
`NetworkPacketsIn`
`NetworkPacketsOut`
`GetItemRequestCount`
`BatchGetItemRequestCount`
`BatchWriteItemRequestCount`
`DeleteItemRequestCount`
`PutItemRequestCount`
`UpdateItemRequestCount`
`TransactWriteItemsCount`
`TransactGetItemsCount`
`ItemCacheHits`
`ItemCacheMisses`
`QueryCacheHits`
`QueryCacheMisses`
`ScanCacheHits`
`ScanCacheMisses`
`TotalRequestCount`
`ErrorRequestCount`
`FaultRequestCount`
`FailedRequestCount`
`QueryRequestCount`
`ScanRequestCount`
`ClientConnections`
`EstimatedDbSize`
`EvictedSize`
`CPUCreditUsage`
`CPUCreditBalance`
`CPUSurplusCreditBalance`
`CPUSurplusCreditsCharged`

并非所有的统计数据，如 `Average` 或 `Sum`，都适用于每个指标。不过，所有这些值均可通过 DAX 控制台获得，也可通过使用适用于所有指标的 CloudWatch 控制台、AWS CLI 或 AWS SDK 获得。在下表中，每个度量都有一个适用于该度量的有效统计信息列表。


****  

| 指标 | 说明 | 
| --- | --- | 
| CPUUtilization |  节点或集群的 CPU 使用率百分比。 单位：`Percent` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| CacheMemoryUtilization |  节点或集群上项目缓存和查询缓存正在使用的可用缓存内存的百分比。缓存数据在内存利用率达到 100% 前开始被驱逐（请参见 `EvictedSize` 指标）。如果 `CacheMemoryUtilization` 在任何节点上达到 100%，则写入请求将受到限制，您应该考虑切换到具有更大节点类型的集群。 单位：`Percent` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| NetworkBytesIn |  节点或集群在所有网络接口上收到的字节数。 单位：`Bytes` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| NetworkBytesOut |  节点或集群在所有网络接口上发送的字节数。此指标依据单个实例上的数据包数量标识传出流量。 单位：`Bytes` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| BaselineNetworkBytesInUtilization |  入口流量在给定时间使用的基准网络带宽的百分比。作为参考，50% 表示使用了可用于入口流量的网络带宽的一半。 单位：`Percent` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| BaselineNetworkBytesOutUtilization |  出口流量在给定时间使用的基准网络带宽的百分比。作为参考，50% 表示使用了可用于出口流量的网络带宽的一半。 单位：`Percent` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| NetworkPacketsIn |  节点或集群在所有网络接口上收到的数据包的数量。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| NetworkPacketsOut |  节点或集群在所有网络接口上发送的数据包的数量。此指标依据单个实例上的数据包数量标识传出流量。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| GetItemRequestCount |  节点或集群处理的 `GetItem` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| BatchGetItemRequestCount |  节点或集群处理的 `BatchGetItem` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| BatchWriteItemRequestCount |  节点或集群处理的 `BatchWriteItem` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| DeleteItemRequestCount |  节点或集群处理的 `DeleteItem` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| PutItemRequestCount |  节点或集群处理的 `PutItem` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| UpdateItemRequestCount |  节点或集群处理的 `UpdateItem` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| TransactWriteItemsCount |  节点或集群处理的 `TransactWriteItems` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| TransactGetItemsCount |  节点或集群处理的 `TransactGetItems` 请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ItemCacheHits |  节点或集群从缓存中返回项目的次数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ItemCacheMisses |  项目不在节点或集群缓存中且必须从 DynamoDB 检索的次数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| QueryCacheHits |  从节点或集群缓存返回查询结果的次数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| QueryCacheMisses |  查询结果不在节点或集群缓存中且必须从 DynamoDB 检索的次数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ScanCacheHits |  从节点或集群缓存返回扫描结果的次数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ScanCacheMisses |  扫描结果不在节点或集群缓存中且必须从 DynamoDB 检索的次数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| TotalRequestCount |  节点或集群处理的请求总数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ErrorRequestCount |  导致节点或集群报告的导致用户错误的请求总数。包括受到节点或集群限制的请求。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ThrottledRequestCount |  受到节点或集群限制的请求总数。不包括受 DynamoDB 限制的请求，可以使用 [DynamoDB 指标](metrics-dimensions.md)监控。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| FaultRequestCount |  导致节点或集群报告内部错误的请求总数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| FailedRequestCount |  导致节点或集群报告错误的请求总数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| QueryRequestCount |  节点或集群处理的查询请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ScanRequestCount |  节点或集群处理的扫描请求数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| ClientConnections |  客户端与节点或集群建立的同时连接数。 单位：`Count` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| EstimatedDbSize |  按节点或集群计算的项目缓存和查询缓存中缓存的数据量的近似值。 单位：`Bytes` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| EvictedSize |  由节点或集群驱逐的数据量，以便为新请求的数据腾出空间。如果错误率上升，并且您看到这个指标也在增长，这可能意味着您的工作集已经增加。您应该考虑切换到具有更大节点类型的集群。 单位：`Bytes` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| CPUCreditUsage |  节点为保持 CPU 使用率而花费的 CPU 信用数。一个 CPU 信用等于一个 vCPU 按 100% 利用率运行一分钟，或者 vCPU、利用率和时间的等效组合（例如，一个 vCPU 按 50% 利用率运行两分钟，或者两个 vCPU 按 25% 利用率运行两分钟）。 CPU 信用指标仅每 5 分钟提供一次。如果您指定一个大于五分钟的时间段，请使用 `Sum` 统计数据，而非 `Average`。 单位：`Credits (vCPU-minutes)` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| CPUCreditBalance |  节点自启动后已累积获得的 CPU 信用数。 在获得信用后，信用将在信用余额中累积；在花费信用后，将从信用余额中扣除信用。信用余额具有最大值限制，这是由 DAX 节点大小决定的。在达到限制后，将丢弃获得的任何新信用。 节点可以花费 `CPUCreditBalance` 中的信用，以便突增到基准 CPU 使用率以上。 单位：`Credits (vCPU-minutes)` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| CPUSurplusCreditBalance |  在 `CPUCreditBalance` 值为零时，DAX 节点花费的超额信用数。 `CPUSurplusCreditBalance` 值由获得的 CPU 信用支付。如果超额信用数超出实例可在 24 小时周期内获得的最大信用数，则超出最大信用数的已花费超额信用将产生额外费用。 单位：`Credits (vCPU-minutes)` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 
| CPUSurplusCreditsCharged |  未由获得的 CPU 信用支付并且会产生额外费用的已花费超额信用数。 花费的超额信用超出节点可在 24 小时周期内获得的最大信用数。对于超出最大信用数的所花费超额信用，将在节点终止时向您收费。 单位：`Credits (vCPU-minutes)` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/amazondynamodb/latest/developerguide/dax-metrics-dimensions-dax.html)  | 

**注意**  
`CPUCreditUsage`、`CPUCreditBalance`、`CPUSurplusCreditBalance` 和 `CPUSurplusCreditsCharged` 指标仅适用于 T3 节点。

### DAX 指标的维度
<a name="dax-metric-dimensions"></a>

DAX 指标由账户、集群 ID 或集群 ID 和节点 ID 组合的值来限定。您可以使用 CloudWatch 控制台，按下表中的任意维度检索 DAX 数据。


****  

|  维度  |  CloudWatch 指标命名空间  |  说明  | 
| --- | --- | --- | 
|  Account  |  DAX Metrics  |  提供账户中所有节点的聚合统计信息。  | 
|  ClusterId  |  Cluster Metrics  |  限制到集群的数据。  | 
|  ClusterId, NodeId  |  ClusterId, NodeId  |  限制到集群中的节点的数据。  | 