目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
AMQP Consumer 输入插件允许您从兼容 AMQP 0-9-1 的消息代理(如 RabbitMQ)摄取数据,从而实现无缝数据收集以进行监控和分析。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace 进行监控和分析。此集成增强了系统和应用程序的可观察性,为性能和运行状况提供了宝贵的见解。
集成详情
AMQP
此插件为 AMQP 0-9-1 提供了一个消费者,RabbitMQ 是其一个突出的实现。AMQP 或高级消息队列协议最初是为了实现网络中不同系统之间可靠、可互操作的消息传递而开发的。该插件使用配置的队列和绑定键从主题交换中读取指标,从而提供了一种灵活高效的方式,用于从兼容 AMQP 的消息传递系统中收集数据。这使用户能够利用现有的 RabbitMQ 实施来有效监控其应用程序,方法是捕获详细的指标以进行分析和告警。
Dynatrace
Telegraf 的 Dynatrace 插件有助于通过 Dynatrace Metrics API V2 将指标传输到 Dynatrace 平台。此插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者自动执行身份验证;或者它可以在独立配置中运行,这需要手动指定 URL 和 API 令牌,用于没有 OneAgent 的环境。除非明确配置为使用可用的配置选项将某些指标视为增量计数器,否则该插件主要将指标报告为仪表。此功能使用户能够自定义发送到 Dynatrace 的指标的行为,从而利用该平台的强大功能进行全面的性能监控和可观察性。对于用户而言,确保 Dynatrace 和 Telegraf 都符合版本要求至关重要,从而在与 Dynatrace 生态系统集成时优化兼容性和性能。
配置
AMQP
[[inputs.amqp_consumer]]
## Brokers to consume from. If multiple brokers are specified a random broker
## will be selected anytime a connection is established. This can be
## helpful for load balancing when not using a dedicated load balancer.
brokers = ["amqp://localhost:5672/influxdb"]
## Authentication credentials for the PLAIN auth_method.
# username = ""
# password = ""
## Name of the exchange to declare. If unset, no exchange will be declared.
exchange = "telegraf"
## Exchange type; common types are "direct", "fanout", "topic", "header", "x-consistent-hash".
# exchange_type = "topic"
## If true, exchange will be passively declared.
# exchange_passive = false
## Exchange durability can be either "transient" or "durable".
# exchange_durability = "durable"
## Additional exchange arguments.
# exchange_arguments = { }
# exchange_arguments = {"hash_property" = "timestamp"}
## AMQP queue name.
queue = "telegraf"
## AMQP queue durability can be "transient" or "durable".
queue_durability = "durable"
## If true, queue will be passively declared.
# queue_passive = false
## Additional arguments when consuming from Queue
# queue_consume_arguments = { }
# queue_consume_arguments = {"x-stream-offset" = "first"}
## A binding between the exchange and queue using this binding key is
## created. If unset, no binding is created.
binding_key = "#"
## Maximum number of messages server should give to the worker.
# prefetch_count = 50
## 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
## Timeout for establishing the connection to a broker
# timeout = "30s"
## Auth method. PLAIN and EXTERNAL are supported
## Using EXTERNAL requires enabling the rabbitmq_auth_mechanism_ssl plugin as
## described here: https://rabbitmq.cn/plugins.html
# auth_method = "PLAIN"
## 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
## Content encoding for message payloads, can be set to
## "gzip", "identity" or "auto"
## - Use "gzip" to decode gzip
## - Use "identity" to apply no encoding
## - Use "auto" determine the encoding using the ContentEncoding header
# content_encoding = "identity"
## Maximum size of decoded message.
## Acceptable units are B, KiB, KB, MiB, MB...
## Without quotes and units, interpreted as size in bytes.
# max_decompression_size = "500MB"
## 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"
输入和输出集成示例
AMQP
-
集成应用程序指标与 AMQP:使用 AMQP Consumer 插件收集发布到 RabbitMQ 交换的应用程序指标。通过配置插件以侦听特定队列,团队可以实时了解应用程序性能,跟踪请求率、错误计数和延迟指标。此设置不仅有助于异常检测,还为容量规划和系统优化提供有价值的数据。
-
事件驱动的监控:每当应用程序中满足某些条件时,配置 AMQP Consumer 以触发特定的监控事件。例如,如果收到指示高错误率的消息,则插件可以将此数据馈送到监控工具,从而生成警报或扩展事件。此集成可以提高对问题的响应速度,并自动化部分操作工作流程。
-
跨平台数据聚合:利用 AMQP Consumer 插件来整合来自分布在不同平台上的各种应用程序的指标。通过利用 RabbitMQ 作为集中式消息代理,组织可以统一其监控数据,从而通过 Telegraf 进行全面的分析和仪表板显示,从而在异构环境中保持可见性。
-
实时日志处理:扩展 AMQP Consumer 的使用范围,以捕获发送到 RabbitMQ 交换的日志数据,实时处理日志以进行监控和告警。此应用程序可确保通过分析日志模式、趋势和异常来及时检测和解决操作问题。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件来监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace 中。此集成提供了资源利用率、应用程序性能和系统运行状况的整体视图,从而能够主动响应各种云环境中的性能问题。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,实现自定义应用程序特定的指标。通过利用额外的计数器和维度选项,开发团队可以获得与其应用程序的运营要求精确对齐的见解,从而实现有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。
-
基于指标变化的自动告警:将 Dynatrace 输出插件与告警机制集成,当特定指标超过定义的阈值时,该机制会触发通知。这种情况涉及配置额外的计数器来监控关键应用程序性能指标,从而实现快速补救措施,以维持服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法