目录
输入和输出集成概述
Zookeeper Telegraf 插件从 Zookeeper 服务器收集和报告指标,方便监控和性能分析。它利用 ‘mntr’ 命令输出收集对于维护 Zookeeper 运行状况至关重要的基本统计信息。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace 进行监控和分析。这种集成增强了系统和应用程序的可观测性,为性能和运行状况提供了宝贵的见解。
集成详情
Apache Zookeeper
Telegraf 的 Zookeeper 插件旨在通过执行 ‘mntr’ 命令从 Zookeeper 服务器收集重要统计信息。此插件充当监控工具,捕获与 Zookeeper 性能相关的重要指标,包括连接详细信息、延迟和各种操作统计信息,从而方便评估 Zookeeper 部署的运行状况和效率。与建议在启用 Prometheus 指标提供程序时使用的 Prometheus 输入插件相比,Zookeeper 插件访问来自 ‘mntr’ 命令的原始输出,使其专为不采用 Prometheus 进行指标报告的配置而定制。这种独特的方法允许管理员直接从 Zookeeper 收集 Java Properties 格式的指标,确保全面了解 Zookeeper 的运行状态,并能够及时响应性能异常。它在 Zookeeper 作为集中式服务运行的环境中尤其出色,用于维护分布式系统的配置信息和名称,从而提供对故障排除和容量规划至关重要的宝贵见解。
Dynatrace
Telegraf 的 Dynatrace 插件通过 Dynatrace Metrics API V2 促进指标传输到 Dynatrace 平台。此插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者自动化身份验证,或者它可以以独立配置运行,这需要手动指定 URL 和 API 令牌,适用于没有 OneAgent 的环境。除非显式配置为使用可用的配置选项将某些指标视为增量计数器,否则该插件主要将指标报告为计量器。此功能使用户能够自定义发送到 Dynatrace 的指标的行为,利用该平台的强大功能进行全面的性能监控和可观测性。对于用户来说,确保 Dynatrace 和 Telegraf 的版本要求合规性至关重要,从而优化与 Dynatrace 生态系统集成时的兼容性和性能。
配置
Apache Zookeeper
[[inputs.zookeeper]]
## An array of address to gather stats about. Specify an ip or hostname
## with port. ie localhost:2181, 10.0.0.1:2181, etc.
## If no servers are specified, then localhost is used as the host.
## If no port is specified, 2181 is used
servers = [":2181"]
## Timeout for metric collections from all servers. Minimum timeout is "1s".
# timeout = "5s"
## Float Parsing - the initial implementation forced any value unable to be
## parsed as an int to be a string. Setting this to "float" will attempt to
## parse float values as floats and not strings. This would break existing
## metrics and may cause issues if a value switches between a float and int.
# parse_floats = "string"
## Optional TLS Config
# enable_tls = false
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## If false, skip chain & host verification
# insecure_skip_verify = true
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"
输入和输出集成示例
Apache Zookeeper
-
集群健康监控:集成 Zookeeper 插件以监控依赖于 Zookeeper 进行配置管理和服务发现的分布式应用程序的健康状况和性能。通过跟踪会话计数、延迟和数据大小等指标,DevOps 团队可以在潜在问题升级之前识别出来,从而确保应用程序的高可用性和可靠性。
-
性能基准测试:在不同的工作负载场景中利用该插件对 Zookeeper 性能进行基准测试。这不仅有助于了解 Zookeeper 在负载下的行为,还有助于调整配置以优化吞吐量并减少峰值操作期间的延迟。
-
异常警报:将此插件与警报工具结合使用,创建一个主动监控系统,如果特定的 Zookeeper 指标超过阈值限制(例如打开的文件描述符计数或高延迟值),则通知工程师。这使团队能够及时响应可能影响服务可靠性的问题。
-
历史数据分析:将 Zookeeper 插件收集的指标存储在时序数据库中,以分析历史性能趋势。这使团队能够评估随时间推移的变化影响,评估扩展操作的有效性,并为未来的容量需求进行规划。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace。这种集成提供了资源利用率、应用程序性能和系统运行状况的整体视图,从而能够在各种云环境中主动响应性能问题。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,实现自定义应用程序特定的指标。通过利用额外的计数器和维度选项,开发团队可以获得与应用程序的运营需求精确对齐的见解,从而实现有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,使用此插件从单个 Telegraf 实例管理所有环境的指标。通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。
-
基于指标变化的自动化警报:将 Dynatrace 输出插件与警报机制集成,该机制在特定指标超过定义的阈值时触发通知。这种情况涉及配置额外的计数器来监控关键的应用程序性能指标,从而能够快速采取补救措施以维护服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。