文档文档

批量处理器插件

此插件通过添加批次标签将指标分组到批次中。这对于并行处理指标很有用,下游的处理器、聚合器或输出可以使用 tagpassmetricpass 选择批次。

指标使用轮循方案分布在批次中。

引入版本: Telegraf v1.33.0 标签: grouping 操作系统支持: all

全局配置选项

除了插件特定的配置设置外,插件还支持其他全局和插件配置设置。这些设置用于修改度量、标签、字段,或创建别名和配置排序等。有关更多详细信息,请参阅 CONFIGURATION.md

配置

## Batch metrics into separate batches by adding a tag indicating the batch index.
[[processors.batch]]
  ## The name of the tag to use for adding the batch index
  batch_tag = "my_batch"

  ## The number of batches to create
  batches = 16

  ## Do not assign metrics with an existing batch assignment to a
  ## different batch.
  # skip_existing = false

示例

以下示例使用这些设置

[[processors.batch]]
  ## The tag key to use for batching
  batch_tag = "batch"

  ## The number of batches to create
  batches = 3
- temperature cpu=25
- temperature cpu=50
- temperature cpu=75
- temperature cpu=25
- temperature cpu=50
- temperature cpu=75
+ temperature,batch=0 cpu=25
+ temperature,batch=1 cpu=50
+ temperature,batch=2 cpu=75
+ temperature,batch=0 cpu=25
+ temperature,batch=1 cpu=50
+ temperature,batch=2 cpu=75

此页面是否有帮助?

感谢您的反馈!


InfluxDB 3.8 新特性

InfluxDB 3.8 和 InfluxDB 3 Explorer 1.6 的主要增强功能。

查看博客文章

InfluxDB 3.8 现已适用于 Core 和 Enterprise 版本,同时发布了 InfluxDB 3 Explorer UI 的 1.6 版本。本次发布着重于操作成熟度,以及如何更轻松地部署、管理和可靠地运行 InfluxDB。

更多信息,请查看

InfluxDB Docker 的 latest 标签将指向 InfluxDB 3 Core

在 **2026 年 2 月 3 日**,InfluxDB Docker 镜像的 latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。

如果使用 Docker 来安装和运行 InfluxDB,latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。例如,如果使用 Docker 运行 InfluxDB v2,请将 latest 版本标签替换为 Docker pull 命令中的特定版本标签 — 例如

docker pull influxdb:2