

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

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

# 使用 Timestream 输出插件安装 Telegraf LiveAnalytics
<a name="Telegraf.installing-output-plugin"></a>

从1.16版本开始，用于 LiveAnalytics 输出的 Timestream 插件已在 Telegraf 的官方版本中提供。要在大多数主流操作系统上安装输出插件，请按照 [InfluxData Telegraf](https://docs.influxdata.com/telegraf/v1.16/introduction/installation/) 文档中概述的步骤进行操作。要在 Amazon Linux 2 操作系统上安装，请按照以下说明操作。

## 在亚马逊 Linux 2 上安装带有 Timestream LiveAnalytics 输出插件的 Telegraf
<a name="w2aab7c44c35b9b5"></a>

 要在 Amazon Linux 2 上使用 Timestream 输出插件安装 Telegraf，请执行以下步骤。

1. 使用 `yum` 程序包管理器安装 Telegraf。

   ```
   cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
   [influxdb]
   name = InfluxDB Repository - RHEL \$releasever
   baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
   enabled = 1
   gpgcheck = 1
   gpgkey = https://repos.influxdata.com/influxdb.key
   EOF
   ```

1. 运行如下命令。

   ```
   sudo sed -i "s/\$releasever/$(rpm -E %{rhel})/g" /etc/yum.repos.d/influxdb.repo
   ```

1. 安装并启动 Telegraf

   ```
   sudo yum install telegraf
   sudo service telegraf start
   ```