

要获得与亚马逊 Timestream 类似的功能 LiveAnalytics，可以考虑适用于 InfluxDB 的亚马逊 Timestream。适用于 InfluxDB 的 Amazon Timestream 提供简化的数据摄取和个位数毫秒级的查询响应时间，以实现实时分析。点击[此处](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)了解更多信息。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# LiveAnalytics 指标和维度的时间流
<a name="metrics-dimensions"></a>

当您与 Timestream 进行互动时 LiveAnalytics，它会向亚马逊 CloudWatch发送以下指标和维度。所有指标每分钟汇总和报告一次。您可以使用以下过程查看 Timestream 的 LiveAnalytics指标。

**使用 CloudWatch 控制台查看指标**

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

1. 打开 CloudWatch 控制台，网址为[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)。

1. 如果需要，可以更改区域。在导航栏上，选择您的 AWS 资源所在的区域。有关更多信息，请参阅 [AWS 服务端点](https://docs.aws.amazon.com/general/latest/gr/rande.html)。

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

1. 在 **All metrics (全部指标)** 选项卡下，选择 `AWS/Timestream for LiveAnalytics.`。

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

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

## 指标的时间流维度 LiveAnalytics
<a name="mcs-metric-dimensions"></a>

Timestream 的 LiveAnalytics 指标由账户、表名或操作的值限定。您可以使用 CloudWatch 控制台检索 Timestream 中下表中任意维度的 LiveAnalytics 数据：


|  维度  |  说明  | 
| --- | --- | 
|  DatabaseName  |  此维度将数据限制为 LiveAnalytics 数据库的特定时间流。该值可以是当前区域和当前 AWS 账户中的任何数据库   | 
|  Operation  |  此维度将 LiveAnalytics 运算（例如、、或`ScheduledQuery`）的数据限制在其中一个时间流`BatchLoad`内。`Storage` `WriteRecords`有关可用值的列表，请参阅《 LiveAnalytics 查询时间流 API 参考》。  | 
|  TableName  |  此维度将数据限制在 LiveAnalyticss 数据库的时间流中的特定表中。  | 

**重要**  
`CumulativeBytesMetered`、`UserErrors` 和 `SystemErrors` 指标仅具有 `Operation` 维度。`SuccessfulRequestLatency` 指标始终具有 `Operation` 维度，但也可能具有 `DatabaseName` 和 `TableName` 维度，具体取决于 `Operation` 的值。这是因为用于 LiveAnalytics表级操作的 Timestream 具有`DatabaseName`和`TableName`作为维度，但账户级别的操作没有。

## 指标的时间 LiveAnalytics 流
<a name="mcs-metrics"></a>

**注意**  
Amazon 以一分钟为间 CloudWatch 隔汇总以下所有时间流的 LiveAnalytics 指标。


**通用指标**  

| 指标 | 说明 | 
| --- | --- | 
|  `SuccessfulRequestLatency`  |  在指定时间段 LiveAnalytics 内成功向 Timestream 发出的请求。 SuccessfulRequestLatency 可以提供两种不同的信息： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) SuccessfulRequestLatency 仅反映 Timestream 中的活动，不考虑网络延迟或客户端活动。 LiveAnalytics   单位：`Milliseconds` [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 


**写入和存储指标**  

| 指标 | 说明 | 
| --- | --- | 
|  `MagneticStoreRejectedRecordCount`  |  被异步拒绝的磁性存储写入记录的数量。如果新记录的版本低于当前版本，或者新记录的版本与当前版本相同但数据不同时，就可能发生这种情况。  单位：`Count` [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `MagneticStoreRejectedUploadUserFailures`  |  因用户错误导致未上传的磁性存储被拒记录报告数量。这可能是由于 IAM 权限配置不正确或 S3 存储桶已删除所导致。  单位：`Count` [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `MagneticStoreRejectedUploadSystemFailures`  |  因系统错误导致未上传的磁性存储被拒记录报告数量。  单位：`Count` [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `ActiveMagneticStorePartitions`  |  给定时间内主动摄取数据的磁性存储分区数量。  单位：`Count` [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `MagneticStorePendingRecordsLatency`  |  对不可用于查询的磁性存储进行的最早写入。写入磁性存储的记录将在 6 小时内可供查询。  单位：`Milliseconds` [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html) 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `MemoryCumulativeBytesMetered`  |  内存存储中存储的数据量（以字节为单位）  单位：`Bytes`  维度：`Operation` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `MagneticCumulativeBytesMetered`  |  磁性存储中存储的数据量（以字节为单位）  单位：`Bytes`  维度：`Operation` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `CumulativeBytesMetered`  |  通过摄取到 Timestream 计量的数据量，以字节为单位。 LiveAnalytics  单位：`Bytes` 维度：`Operation` 有效统计数据：`Sum`  | 
|  `NumberOfRecords`  |  收录到 Timestream 的记录数。 LiveAnalytics  单位：`Count` 维度：`Operation` 有效统计数据：`Sum`  | 


**查询指标**  

| 指标 | 说明 | 
| --- | --- | 
|  `CumulativeBytesMetered`  |  发送到 Timestream 的查询所扫描的数据量 LiveAnalytics，以字节为单位。  单位：`Bytes`  维度：`Operation` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
| ResourceCount |  账户中用于查询工作负载的时间流计算单位 (TCUs)。对于处于活动状态的查询工作负载，此指标每分钟从账户发送一次计算单位的最大值和最小值。 单位：`Count` 有效统计数据：Minimum、Maximum 维度：`Service: Timestream`、`Resource: QueryTCU`、`Type: Resource`、`Class: OnDemand`  | 


**错误指标**  

| 指标 | 说明 | 
| --- | --- | 
|  `SystemErrors`  |  为此向 Timestream 发 LiveAnalytics 出的请求会在指定的时间段内生成。 SystemError SystemError 通常表示内部服务错误。  单位：`Count`  维度：`Operation` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 
|  `UserErrors`  |  为此 LiveAnalytics 向 Timestream 发出的请求会在指定的时间段内生成 InvalidRequest 错误。 InvalidRequest 通常表示客户端错误，例如参数组合无效、尝试更新不存在的表或请求签名不正确。 UserErrors 表示当前 AWS 区域和当前 AWS 账户的无效请求的总和。  单位：`Count`  维度：`Operation` 有效统计数据： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/timestream/latest/developerguide/metrics-dimensions.html)  | 

**重要**  
并非所有的统计数据，如 `Average` 或 `Sum`，都适用于每个指标。但是，所有这些值都可通过 LiveAnalytics 控制台的 Timestream 获得，或者使用 CloudWatch 控制台 AWS CLI、或 AWS SDKs 用于所有指标。