文档文档

OpenTelemetry 输出插件

此插件通过 gRPC 将指标写入OpenTelemetry 服务器和代理。

引入于: Telegraf v1.20.0 标签: logging, messaging 操作系统支持: all

全局配置选项

插件支持其他全局和插件配置设置,用于修改指标、标签和字段,创建别名以及配置插件顺序等任务。更多详情请参阅 CONFIGURATION.md

配置

# Send OpenTelemetry metrics over gRPC
[[outputs.opentelemetry]]
  ## Override the default (localhost:4317) OpenTelemetry gRPC service
  ## address:port
  # service_address = "localhost:4317"

  ## Override the default (5s) request timeout
  # timeout = "5s"

  ## Optional TLS Config.
  ##
  ## Root certificates for verifying server certificates encoded in PEM format.
  # tls_ca = "/etc/telegraf/ca.pem"
  ## The public and private key pairs for the client encoded in PEM format.
  ## May contain intermediate certificates.
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"
  ## Use TLS, but skip TLS chain and host verification.
  # insecure_skip_verify = false
  ## Send the specified TLS server name via SNI.
  # tls_server_name = "foo.example.com"

  ## Override the default (gzip) compression used to send data.
  ## Supports: "gzip", "none"
  # compression = "gzip"

  ## NOTE: Due to the way TOML is parsed, tables must be at the END of the
  ## plugin definition, otherwise additional config options are read as part of
  ## the table

  ## Configuration options for the Coralogix dialect
  ## Enable the following section of you use this plugin with a Coralogix endpoint
  # [outputs.opentelemetry.coralogix]
  #   ## Your Coralogix private key (required).
  #   ## Please note that this is sensitive data!
  #   private_key = "your_coralogix_key"
  #
  #   ## Application and subsystem names for the metrics (required)
  #   application = "$NAMESPACE"
  #   subsystem = "$HOSTNAME"

  ## Additional OpenTelemetry resource attributes
  # [outputs.opentelemetry.attributes]
  # "service.name" = "demo"

  ## Additional gRPC request metadata
  # [outputs.opentelemetry.headers]
  # key1 = "value1"

支持的方言

Coralogix

此插件通过取消注释 [output.opentelemetry.coralogix] 部分来支持将数据发送到 Coralogix 服务器。

在那里,您可以找到与服务器交互所需的设置。

  • private_key 是您的私钥,您可以在 Settings > Send Your Data 中找到它。
  • application 是您的应用程序名称,它将被添加到您的 metric attributes 中。
  • subsystem 是您的子系统,它将被添加到您的 metric attributes 中。

更多信息请参阅 入门页面

架构

InfluxDB->OpenTelemetry 转换 schema实现 托管在 GitHub 上。

对于指标,存在两个输入 schema。测量名称为 prometheus 的行协议被假定具有与 Prometheus 输入插件匹配的 schema,当 metric_version = 2 时。其他测量名称的行协议被假定具有与 Prometheus 输入插件匹配的 schema,当 metric_version = 1 时。如果两个 schema 假设都失败,则行协议数据将被解释为

  • Metric type = gauge (或 counter,如果输入插件指示)
  • Metric name = [measurement]_[field key]
  • Metric value = 行协议字段值,转换为 float
  • Metric labels = 行协议 tags

另请参阅 OpenTelemetry 输入插件。


此页面是否有帮助?

感谢您的反馈!


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