目录
输入和输出集成概览
此插件从 RabbitMQ 服务器读取指标,提供对消息传递系统的性能和状态的重要见解。
Graphite 插件使用户能够通过 TCP 将 Telegraf 收集的指标发送到 Graphite。此集成允许使用 Graphite 的强大功能有效地存储和可视化时间序列数据。
集成详情
RabbitMQ
Telegraf 的 RabbitMQ 插件允许用户通过 RabbitMQ Management Plugin 从 RabbitMQ 服务器收集指标。此功能对于监控 RabbitMQ 实例的性能和健康状况至关重要,RabbitMQ 实例广泛用于各种应用程序中的消息队列和处理。该插件提供对关键 RabbitMQ 指标的全面见解,包括消息速率、队列深度和节点健康统计信息,从而使操作员能够保持其消息传递基础设施的最佳性能和稳健性。此外,它还支持用于安全管理敏感凭据的密钥存储,从而使与现有系统的集成更加顺畅。配置选项允许灵活地指定要监控的节点、队列和交换器,为不同的部署场景提供有价值的适应性。
Graphite
此插件通过原始 TCP 将指标写入 Graphite,从而允许将 Telegraf 收集的指标无缝集成到 Graphite 生态系统中。借助此插件,用户可以配置多个 TCP 端点以进行负载均衡,从而确保指标传输的高可用性和可靠性。使用前缀自定义指标命名以及利用各种模板选项的功能增强了数据在 Graphite 中表示方式的灵活性。此外,对 Graphite 标签的支持以及对指标名称进行严格清理的选项允许强大的数据管理,以满足用户的各种需求。此功能对于希望利用 Graphite 强大的指标存储和可视化功能,同时保持对数据表示的控制的组织至关重要。
配置
RabbitMQ
[[inputs.rabbitmq]]
## Management Plugin url. (default: http://localhost:15672)
# url = "http://localhost:15672"
## Tag added to rabbitmq_overview series; deprecated: use tags
# name = "rmq-server-1"
## Credentials
# username = "guest"
# password = "guest"
## 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
## Optional request timeouts
## ResponseHeaderTimeout, if non-zero, specifies the amount of time to wait
## for a server's response headers after fully writing the request.
# header_timeout = "3s"
##
## client_timeout specifies a time limit for requests made by this client.
## Includes connection time, any redirects, and reading the response body.
# client_timeout = "4s"
## A list of nodes to gather as the rabbitmq_node measurement. If not
## specified, metrics for all nodes are gathered.
# nodes = ["rabbit@node1", "rabbit@node2"]
## A list of queues to gather as the rabbitmq_queue measurement. If not
## specified, metrics for all queues are gathered.
## Deprecated in 1.6: Use queue_name_include instead.
# queues = ["telegraf"]
## A list of exchanges to gather as the rabbitmq_exchange measurement. If not
## specified, metrics for all exchanges are gathered.
# exchanges = ["telegraf"]
## Metrics to include and exclude. Globs accepted.
## Note that an empty array for both will include all metrics
## Currently the following metrics are supported: "exchange", "federation", "node", "overview", "queue"
# metric_include = []
# metric_exclude = []
## Queues to include and exclude. Globs accepted.
## Note that an empty array for both will include all queues
# queue_name_include = []
# queue_name_exclude = []
## Federation upstreams to include and exclude specified as an array of glob
## pattern strings. Federation links can also be limited by the queue and
## exchange filters.
# federation_upstream_include = []
# federation_upstream_exclude = []
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
输入和输出集成示例
RabbitMQ
-
监控队列性能指标:使用 RabbitMQ 插件来跟踪队列性能随时间的变化。这包括设置监控仪表板,以可视化关键队列指标,例如消息速率、消费者数量和消息传递速率。借助此信息,团队可以通过分析趋势并就扩展或优化其 RabbitMQ 配置做出数据驱动的决策,从而主动解决任何瓶颈或性能问题。
-
系统健康状况警报:将 RabbitMQ 插件与警报系统集成,以将 RabbitMQ 实例中潜在的问题通知运营团队。例如,如果未确认消息的数量达到临界阈值,或者队列变得不堪重负,则可以触发警报,从而可以立即进行调查并迅速采取补救措施,以维护消息流的健康状况。
-
分析消息处理指标:使用插件收集有关消息处理性能的详细指标,例如已发布、已确认和已重新传递的消息的速率。通过分析这些指标,团队可以评估其消息消费者应用程序的效率,并在必要时调整配置或代码,从而提高整体系统吞吐量和弹性。
-
跨系统数据集成:利用 RabbitMQ 插件收集的指标来集成 RabbitMQ 与其他系统或服务之间的数据流。例如,使用收集的指标来驱动自动化工作流或分析管道,这些管道利用在 RabbitMQ 中处理的消息,从而使组织能够优化工作流并增强其生态系统中的数据敏捷性。
Graphite
-
动态指标可视化:Graphite 插件可用于将来自各种来源(例如应用程序性能数据或服务器健康指标)的实时指标馈送到 Graphite。这种动态集成使团队能够创建交互式仪表板,以可视化关键绩效指标、跟踪随时间变化的趋势,并做出数据驱动的决策以提高系统性能。
-
负载均衡指标收集:通过在插件中配置多个 TCP 端点,组织可以实施负载均衡以进行指标传输。此用例确保指标交付既有弹性又高效,从而降低了高流量期间数据丢失的风险,并保持了到 Graphite 的可靠信息流。
-
自定义指标标记:借助对 Graphite 标签的支持,用户可以使用 Graphite 插件来增强其指标的粒度。使用相关信息(例如应用程序环境或服务类型)标记指标,可以进行更精细的查询和分析,从而使团队能够深入研究感兴趣的特定领域,以获得更好的运营见解。
-
增强的数据清理:利用插件的严格清理选项,用户可以确保其指标名称符合 Graphite 的要求。这种主动措施消除了指标名称中无效字符引起的潜在问题,从而实现了更清晰的数据管理和更准确的可视化。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。