文档文档

排查 Telegraf

使用 --test 验证 Telegraf 配置

运行一次 Telegraf 收集,将指标输出到 stdout:telegraf --config telegraf.conf --test

使用 --once 选项进行单次执行

测试通过后,运行 telegraf --config telegraf.conf --once 来执行一次所有配置的插件。这将把输出发送到 telegraf.conf 中指定的合作系统,而不是写入 stdout

添加 outputs.file 以读取到文件或 STDOUT

如果出现以下情况,则上一步可能有所帮助:

  • 您在输出时遇到问题,并试图确定是配置问题还是连接问题。
  • -test 如预期一样将指标输出到 stdout,并且您的输入、解析器、处理器和聚合器已正确配置。请注意,如果这是一个监听器插件,-test 不会立即输出任何指标。

添加 file 输出插件,将指标报告到 STDOUT 或文件。

[[outputs.file]]
  files = ["stdout"]

在设置中将 debug = true

当您在全局设置中将 debug = true 时,Telegraf 将以 debug 日志消息运行。

2021-06-28T19:18:00Z I! Starting Telegraf 1.19.0
2021-06-28T19:18:00Z I! Loaded inputs: cpu disk diskio mem net processes swap system
2021-06-28T19:18:00Z I! Loaded aggregators:
2021-06-28T19:18:00Z I! Loaded processors:
2021-06-28T19:18:00Z I! Loaded outputs: influxdb_v2
2021-06-28T19:18:00Z I! Tags enabled: host=MBP15-INFLUX.local
2021-06-28T19:18:00Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"MBP15-INFLUX.local", Flush Interval:30s
2021-06-28T19:18:00Z D! [agent] Initializing plugins
2021-06-28T19:18:00Z D! [agent] Connecting outputs
2021-06-28T19:18:00Z D! [agent] Attempting connection to [outputs.influxdb_v2]
2021-06-28T19:18:00Z D! [agent] Successfully connected to outputs.influxdb_v2
2021
-06-28T19:18:00Z D! [agent] Starting service inputs

此页面是否有帮助?

感谢您的反馈!


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