目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会变得更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
Zookeeper Telegraf 插件收集并报告来自 Zookeeper 服务器的指标,从而促进监控和性能分析。它利用“mntr”命令输出收集对于维护 Zookeeper 运行状况至关重要的基本统计信息。
Graphite 插件使用户能够通过 TCP 将 Telegraf 收集的指标发送到 Graphite 中。此集成允许使用 Graphite 的强大功能高效地存储和可视化时间序列数据。
集成详情
Apache Zookeeper
Telegraf 的 Zookeeper 插件旨在通过执行“mntr”命令来收集来自 Zookeeper 服务器的重要统计信息。此插件充当监控工具,捕获与 Zookeeper 性能相关的重要指标,包括连接详细信息、延迟和各种操作统计信息,从而有助于评估 Zookeeper 部署的运行状况和效率。与启用 Prometheus 指标提供程序时推荐使用的 Prometheus 输入插件相比,Zookeeper 插件访问来自“mntr”命令的原始输出,使其适合不采用 Prometheus 进行指标报告的配置。这种独特的方法允许管理员直接从 Zookeeper 收集 Java Properties 格式的指标,确保全面了解 Zookeeper 的运行状态,并能够及时响应性能异常。它在 Zookeeper 作为集中式服务运行的环境中尤其出色,用于维护分布式系统的配置信息和名称,从而提供对于故障排除和容量规划至关重要的不可估量的见解。
Graphite
此插件通过原始 TCP 将指标写入 Graphite,从而实现 Telegraf 收集的指标与 Graphite 生态系统的无缝集成。借助此插件,用户可以配置多个 TCP 端点以进行负载均衡,从而确保指标传输的高可用性和可靠性。使用前缀自定义指标命名以及利用各种模板选项的能力增强了数据在 Graphite 中表示方式的灵活性。此外,对 Graphite 标签的支持以及对指标名称进行严格清理的选项允许进行强大的数据管理,以满足用户的各种需求。此功能对于希望利用 Graphite 强大的指标存储和可视化功能,同时保持对数据表示方式的控制的组织至关重要。
配置
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
Graphite
# Configuration for Graphite server to send metrics to
[[outputs.graphite]]
## TCP endpoint for your graphite instance.
## If multiple endpoints are configured, the output will be load balanced.
## Only one of the endpoints will be written to with each iteration.
servers = ["localhost:2003"]
## Local address to bind when connecting to the server
## If empty or not set, the local address is automatically chosen.
# local_address = ""
## Prefix metrics name
prefix = ""
## Graphite output template
## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
template = "host.tags.measurement.field"
## Strict sanitization regex
## This is the default sanitization regex that is used on data passed to the
## graphite serializer. Users can add additional characters here if required.
## Be aware that the characters, '/' '@' '*' are always replaced with '_',
## '..' is replaced with '.', and '\' is removed even if added to the
## following regex.
# graphite_strict_sanitize_regex = '[^a-zA-Z0-9-:._=\p{L}]'
## Enable Graphite tags support
# graphite_tag_support = false
## Applied sanitization mode when graphite tag support is enabled.
## * strict - uses the regex specified above
## * compatible - allows for greater number of characters
# graphite_tag_sanitize_mode = "strict"
## Character for separating metric name and field for Graphite tags
# graphite_separator = "."
## Graphite templates patterns
## 1. Template for cpu
## 2. Template for disk*
## 3. Default template
# templates = [
# "cpu tags.measurement.host.field",
# "disk* measurement.field",
# "host.measurement.tags.field"
#]
## timeout in seconds for the write connection to graphite
# timeout = "2s"
## 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
输入和输出集成示例
Apache Zookeeper
-
集群运行状况监控:集成 Zookeeper 插件以监控依赖 Zookeeper 进行配置管理和服务发现的分布式应用程序的运行状况和性能。通过跟踪会话计数、延迟和数据大小等指标,DevOps 团队可以在潜在问题升级之前识别出来,从而确保应用程序的高可用性和可靠性。
-
性能基准测试:在不同的工作负载场景中利用插件对 Zookeeper 性能进行基准测试。这不仅有助于了解 Zookeeper 在负载下的行为,还有助于调整配置以优化吞吐量并减少峰值操作期间的延迟。
-
异常警报:将此插件与警报工具结合使用,以创建主动监控系统,如果特定的 Zookeeper 指标超出阈值限制(例如打开的文件描述符计数或高延迟值),则通知工程师。这使团队能够及时响应可能影响服务可靠性的问题。
-
历史数据分析:将 Zookeeper 插件收集的指标存储在时间序列数据库中,以分析历史性能趋势。这使团队能够评估随时间推移的变化影响、评估扩展操作的有效性并规划未来的容量需求。
Graphite
-
动态指标可视化:Graphite 插件可用于将来自各种来源(例如应用程序性能数据或服务器运行状况指标)的实时指标馈送到 Graphite 中。这种动态集成使团队能够创建交互式仪表板,可视化关键绩效指标,跟踪随时间推移的趋势,并做出数据驱动的决策以提高系统性能。
-
负载均衡指标收集:通过在插件中配置多个 TCP 端点,组织可以实现指标传输的负载均衡。此用例确保指标交付既具有弹性又高效,从而降低高峰时段数据丢失的风险,并保持到 Graphite 的可靠信息流。
-
自定义指标标记:借助对 Graphite 标签的支持,用户可以使用 Graphite 插件来增强其指标的粒度。使用相关信息(例如应用程序环境或服务类型)标记指标可以进行更精细的查询和分析,使团队能够深入研究特定感兴趣的领域,以获得更好的运营见解。
-
增强的数据清理:利用插件的严格清理选项,用户可以确保其指标名称符合 Graphite 的要求。这种主动措施消除了指标名称中无效字符引起的潜在问题,从而实现更清洁的数据管理和更准确的可视化。
反馈
感谢您成为我们社区的一份子!如果您有任何一般反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会变得更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法