目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。 当您将任何数据视为时间序列数据时,它会更有价值。 借助 InfluxDB,这是 #1 的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
NATS Consumer Input Plugin 实现了从 NATS 消息主题实时数据消费,无缝集成到 Telegraf 数据管道中,用于监控和指标收集。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace,以进行监控和分析。 这种集成增强了系统和应用程序的可观察性,为性能和运营状况提供了有价值的见解。
集成详情
NATS
NATS Consumer Plugin 允许 Telegraf 从指定的 NATS 主题读取指标,并基于支持的输入数据格式创建指标。 利用队列组允许多个 Telegraf 实例并行从 NATS 集群读取数据,从而提高吞吐量和可靠性。 该插件还支持多种身份验证方法,包括用户名/密码、NATS 凭据文件和 nkey 种子文件,确保与 NATS 服务器的安全通信。 由于 JetStream 等功能有助于历史消息的消费,因此在数据持久性和消息可靠性至关重要的环境中,此插件尤其有用。 此外,配置各种操作参数的能力使该插件适用于高吞吐量场景,同时保持性能完整性。
Dynatrace
Telegraf 的 Dynatrace 插件有助于通过 Dynatrace Metrics API V2 将指标传输到 Dynatrace 平台。 该插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者可以自动进行身份验证;或者它可以在独立配置中运行,这需要手动指定 URL 和 API 令牌,以用于没有 OneAgent 的环境。 除非明确配置为使用可用的配置选项将某些指标视为增量计数器,否则该插件主要将指标报告为仪表。 此功能使用户能够自定义发送到 Dynatrace 的指标的行为,从而利用该平台的强大功能进行全面的性能监控和可观察性。 对于用户而言,确保 Dynatrace 和 Telegraf 都符合版本要求至关重要,从而在与 Dynatrace 生态系统集成时优化兼容性和性能。
配置
NATS
[[inputs.nats_consumer]]
## urls of NATS servers
servers = ["nats://localhost:4222"]
## subject(s) to consume
## If you use jetstream you need to set the subjects
## in jetstream_subjects
subjects = ["telegraf"]
## jetstream subjects
## jetstream is a streaming technology inside of nats.
## With jetstream the nats-server persists messages and
## a consumer can consume historical messages. This is
## useful when telegraf needs to restart it don't miss a
## message. You need to configure the nats-server.
## https://docs.nats.io/nats-concepts/jetstream.
jetstream_subjects = ["js_telegraf"]
## name a queue group
queue_group = "telegraf_consumers"
## Optional authentication with username and password credentials
# username = ""
# password = ""
## Optional authentication with NATS credentials file (NATS 2.0)
# credentials = "/etc/telegraf/nats.creds"
## Optional authentication with nkey seed file (NATS 2.0)
# nkey_seed = "/etc/telegraf/seed.txt"
## Use Transport Layer Security
# secure = false
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## Sets the limits for pending msgs and bytes for each subscription
## These shouldn't need to be adjusted except in very high throughput scenarios
# pending_message_limit = 65536
# pending_bytes_limit = 67108864
## Max undelivered messages
## This plugin uses tracking metrics, which ensure messages are read to
## outputs before acknowledging them to the original broker to ensure data
## is not lost. This option sets the maximum messages to read from the
## broker that have not been written by an output.
##
## This value needs to be picked with awareness of the agent's
## metric_batch_size value as well. Setting max undelivered messages too high
## can result in a constant stream of data batches to the output. While
## setting it too low may never flush the broker's messages.
# max_undelivered_messages = 1000
## Data format to consume.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
Dynatrace
[[outputs.dynatrace]]
## For usage with the Dynatrace OneAgent you can omit any configuration,
## the only requirement is that the OneAgent is running on the same host.
## Only setup environment url and token if you want to monitor a Host without the OneAgent present.
##
## Your Dynatrace environment URL.
## For Dynatrace OneAgent you can leave this empty or set it to "http://127.0.0.1:14499/metrics/ingest" (default)
## For Dynatrace SaaS environments the URL scheme is "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest"
## For Dynatrace Managed environments the URL scheme is "https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest"
url = ""
## Your Dynatrace API token.
## Create an API token within your Dynatrace environment, by navigating to Settings > Integration > Dynatrace API
## The API token needs data ingest scope permission. When using OneAgent, no API token is required.
api_token = ""
## Optional prefix for metric names (e.g.: "telegraf")
prefix = "telegraf"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Optional flag for ignoring tls certificate check
# insecure_skip_verify = false
## Connection timeout, defaults to "5s" if not set.
timeout = "5s"
## If you want metrics to be treated and reported as delta counters, add the metric names here
additional_counters = [ ]
## In addition or as an alternative to additional_counters, if you want metrics to be treated and
## reported as delta counters using regular expression pattern matching
additional_counters_patterns = [ ]
## 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
## Optional dimensions to be added to every metric
# [outputs.dynatrace.default_dimensions]
# default_key = "default value"
输入和输出集成示例
NATS
-
实时分析仪表板:利用 NATS 插件从各种 NATS 主题实时收集指标,并将它们馈送到集中的分析仪表板中。 这种设置可以立即查看实时应用程序性能,使团队能够快速响应运营问题或性能下降。
-
分布式系统监控:在分布式架构中部署配置了 NATS 插件的 Telegraf 的多个实例。 这种方法使团队能够有效地聚合来自各种微服务的指标,从而提供系统运行状况和性能的整体视图,同时确保在传输过程中不会丢失任何消息。
-
历史消息恢复:利用 NATS JetStream 的功能以及此插件,在 Telegraf 重新启动后恢复和处理历史消息。 此功能对于需要高可靠性的应用程序尤其有益,确保即使在服务中断的情况下也不会丢失任何关键指标。
-
动态负载均衡:实施动态负载均衡场景,其中 Telegraf 实例根据负载从 NATS 集群中消费消息。 调整队列组设置以控制活动消费者的数量,从而在需求波动时实现更好的资源利用和性能扩展。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件来监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace 中。 这种集成提供了资源利用率、应用程序性能和系统运行状况的整体视图,从而能够主动响应各种云环境中的性能问题。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,来实现自定义应用程序特定的指标。 通过利用额外的计数器和维度选项,开发团队可以获得与应用程序运营需求精确对齐的见解,从而实现有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。 通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。
-
基于指标更改的自动警报:将 Dynatrace 输出插件与警报机制集成,当特定指标超过定义的阈值时,该警报机制会触发通知。 这种情况涉及配置额外的计数器来监控关键的应用程序性能指标,从而能够采取快速的补救措施来维持服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。 当您将任何数据视为时间序列数据时,它会更有价值。 借助 InfluxDB,这是 #1 的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法