文档

双写到 InfluxDB OSS 和 InfluxDB Cloud

如果您想在两个位置备份数据,或者您正在从 OSS 迁移到 Cloud,您可能需要设置双写。

使用 Telegraf 同时写入 InfluxDB OSS 和 InfluxDB Cloud。

以下示例配置使用

使用以下配置同时将数据写入 OSS 和 Cloud 实例。

示例配置

[[inputs.cpu]]
[[inputs.mem]]

## Any other inputs, processors, aggregators that you want to include in your configuration.

# Send data to InfluxDB OSS v2
[[outputs.influxdb_v2]]
  ## The URLs of the InfluxDB instance.
  ##
  ## Multiple URLs can be specified for a single cluster, only ONE of the
  ## urls will be written to each interval.
  ## urls exp: http://127.0.0.1:9999
  urls = ["http://localhost:8086"]

  ## OSS token for authentication.
  token = "$INFLUX_TOKEN_OSS"

  ## Organization is the name of the organization you want to write to. It must already exist.
  organization = "influxdata"

  ## Destination bucket to write to.
  bucket = "telegraf"

# Send data to InfluxDB Cloud - AWS West cloud instance
 [[outputs.influxdb_v2]]
  ## The URLs of the InfluxDB Cloud instance.

  urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]

  ## Cloud token for authentication.
  token = "$INFLUX_TOKEN_CLOUD"

  ## Organization is the name of the organization you want to write to. It must already exist.
  organization = "example@domain.com"

  ## Destination bucket to write into.
  bucket = "telegraf"

此页面是否对您有帮助?

感谢您的反馈!


Flux 的未来

Flux 即将进入维护模式。 您可以继续像现在一样使用它,而无需对您的代码进行任何更改。

阅读更多

现已全面上市

InfluxDB 3 Core 和 Enterprise

快速启动。 更快扩展。

获取更新

InfluxDB 3 Core 是一个开源、高速、最新的数据引擎,可实时收集和处理数据,并将其持久化到本地磁盘或对象存储。 InfluxDB 3 Enterprise 以 Core 的基础为构建,增加了高可用性、读取副本、增强的安全性以及数据压缩,从而实现更快的查询和优化的存储。 InfluxDB 3 Enterprise 的免费层可供非商业家庭或业余爱好者使用。

有关更多信息,请查看