目录
输入和输出集成概述
此插件从 RabbitMQ 服务器读取指标,提供对消息传递系统性能和状态的基本洞察。
此插件使用基于 HTTP 的 Prometheus 远程写入协议将指标从 Telegraf 发送到 Thanos,从而实现高效且可扩展地摄取到 Thanos Receive 组件中。
集成详情
RabbitMQ
Telegraf 的 RabbitMQ 插件允许用户通过 RabbitMQ Management Plugin 从 RabbitMQ 服务器收集指标。此功能对于监控 RabbitMQ 实例的性能和运行状况至关重要,RabbitMQ 实例广泛用于各种应用程序中的消息队列和处理。该插件提供对关键 RabbitMQ 指标的全面洞察,包括消息速率、队列深度和节点运行状况统计信息,从而使操作员能够维护其消息传递基础设施的最佳性能和稳健性。此外,它还支持用于安全管理敏感凭证的密钥存储,从而使与现有系统的集成更加顺畅。配置选项允许灵活地指定要监控的节点、队列和交换机,为各种部署场景提供有价值的适应性。
Thanos
Telegraf 的 HTTP 插件可以通过其 Remote Write 兼容的 Receive 组件将指标直接发送到 Thanos。通过将数据格式设置为 prometheusremotewrite
,Telegraf 可以将指标序列化为本机 Prometheus 客户端使用的相同的基于 protobuf 的格式。此设置实现了高吞吐量、低延迟的指标摄取到 Thanos 中,从而促进了大规模的集中式可观测性。这在混合环境中尤其有用,在这些环境中,Telegraf 从 Prometheus 本机范围之外的系统(例如 SNMP 设备、Windows 主机或自定义应用程序)收集指标,并将它们直接流式传输到 Thanos 以进行长期存储和全局查询。
配置
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 = []
Thanos
[[outputs.http]]
## Thanos Receive endpoint for remote write
url = "http://thanos-receive.example.com/api/v1/receive"
## HTTP method
method = "POST"
## Data format set to Prometheus remote write
data_format = "prometheusremotewrite"
## Optional headers (authorization, etc.)
# [outputs.http.headers]
# Authorization = "Bearer YOUR_TOKEN"
## Optional TLS configuration
# tls_ca = "/path/to/ca.pem"
# tls_cert = "/path/to/cert.pem"
# tls_key = "/path/to/key.pem"
# insecure_skip_verify = false
## Request timeout
timeout = "10s"
输入和输出集成示例
RabbitMQ
-
监控队列性能指标:使用 RabbitMQ 插件来跟踪队列性能随时间的变化。这包括设置监控仪表板,以可视化关键队列指标,例如消息速率、消费者数量和消息传递速率。通过这些信息,团队可以通过分析趋势并就扩展或优化其 RabbitMQ 配置做出数据驱动的决策,从而主动解决任何瓶颈或性能问题。
-
系统健康状况警报:将 RabbitMQ 插件与警报系统集成,以将 RabbitMQ 实例中潜在的问题通知运营团队。例如,如果未确认消息的数量达到临界阈值,或者队列变得不堪重负,则可以触发警报,从而可以立即进行调查和快速补救措施,以维护消息流的健康状况。
-
分析消息处理指标:使用该插件收集有关消息处理性能的详细指标,例如已发布、已确认和已重新传递的消息的速率。通过分析这些指标,团队可以评估其消息消费者应用程序的效率,并在必要时调整配置或代码,从而提高整体系统吞吐量和弹性。
-
跨系统数据集成:利用 RabbitMQ 插件收集的指标来集成 RabbitMQ 和其他系统或服务之间的数据流。例如,使用收集的指标来驱动自动化工作流或分析管道,这些管道利用在 RabbitMQ 中处理的消息,从而使组织能够优化工作流并增强其生态系统中的数据敏捷性。
Thanos
-
无代理云监控:在云虚拟机上部署 Telegraf 代理以收集系统和应用程序指标,然后使用 Remote Write 将它们直接流式传输到 Thanos 中。这提供了集中式可观测性,而无需在每个位置都部署 Prometheus 节点。
-
可扩展的 Windows 主机监控:在 Windows 计算机上使用 Telegraf 收集操作系统级别的指标,并通过 Remote Write 将它们发送到 Thanos Receive。这使得跨异构环境的可观测性成为可能,而 Prometheus 仅在 Linux 上提供本机支持。
-
跨区域指标联邦:多个地理区域中的 Telegraf 代理可以使用此插件将数据推送到区域本地的 Thanos Receivers。从那里,Thanos 可以全局地重复数据删除和查询指标,从而减少延迟和网络出口成本。
-
将第三方数据集成到 Thanos 中:使用 Telegraf 输入从自定义遥测源(例如 REST API 或专有日志)收集指标,并通过 Remote Write 将它们转发到 Thanos。这会将非原生数据带入 Prometheus 兼容的长期分析管道中。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。