目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。 当您将任何数据视为时序数据时,它都更有价值。 使用 InfluxDB,第一时序平台,它与 Telegraf 一起构建以实现扩展。
查看入门方法
输入和输出集成概述
此插件从 RabbitMQ 服务器读取指标,提供对消息传递系统性能和状态的重要见解。
此插件使 Telegraf 能够使用 Prometheus 远程写入协议将指标发送到 Cortex,从而实现无缝摄取到 Cortex 的可扩展、多租户时序存储中。
集成详情
RabbitMQ
Telegraf 的 RabbitMQ 插件允许用户通过 RabbitMQ 管理插件从 RabbitMQ 服务器收集指标。 此功能对于监控 RabbitMQ 实例的性能和健康状况至关重要,RabbitMQ 实例广泛用于各种应用程序中的消息队列和处理。 该插件提供对关键 RabbitMQ 指标的全面洞察,包括消息速率、队列深度和节点健康统计信息,从而使运营商能够保持其消息传递基础设施的最佳性能和稳健性。 此外,它还支持 secret-stores 以安全地管理敏感凭据,从而使与现有系统的集成更加顺畅。 配置选项允许灵活指定要监控的节点、队列和交换机,为各种部署场景提供宝贵的适应性。
Cortex
借助 Telegraf 的 HTTP 输出插件和 prometheusremotewrite 数据格式,您可以将指标直接发送到 Cortex,Cortex 是 Prometheus 的水平可扩展、长期存储后端。 Cortex 支持多租户,并使用 Prometheus protobuf 格式接受远程写入请求。 通过使用 Telegraf 作为收集代理和远程写入作为传输机制,组织可以将可观察性扩展到 Prometheus 本身不支持的来源(例如 Windows 主机、支持 SNMP 的设备或自定义应用程序指标),同时利用 Cortex 的高可用性和长期保留能力。
配置
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 = []
Cortex
[[outputs.http]]
## Cortex Remote Write endpoint
url = "http://cortex.example.com/api/v1/push"
## Use POST to send data
method = "POST"
## Send metrics using Prometheus remote write format
data_format = "prometheusremotewrite"
## Optional HTTP headers for authentication
# [outputs.http.headers]
# X-Scope-OrgID = "your-tenant-id"
# Authorization = "Bearer YOUR_API_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 中处理的消息,使组织能够优化工作流程并增强其生态系统中的数据敏捷性。
Cortex
-
统一的多租户监控:使用 Telegraf 从不同的团队或环境收集指标,并使用单独的 X-Scope-OrgID 标头将它们推送到 Cortex。 这实现了每个租户的隔离数据摄取和查询,非常适合托管服务和平台团队。
-
将 Prometheus 覆盖范围扩展到边缘设备:在边缘或 IoT 设备上部署 Telegraf 以收集系统指标并将它们发送到中央 Cortex 集群。 即使对于没有本地 Prometheus 抓取器的环境,此方法也能确保一致的可观察性。
-
具有联合租户的全局服务可观察性:通过配置 Telegraf 代理将数据推送到区域 Cortex 集群(每个集群都标记有租户标识符)来聚合来自全局基础设施的指标。 Cortex 处理跨区域的重复数据删除和集中访问。
-
自定义应用程序遥测管道:通过 Telegraf 的 exec 或 http 输入插件收集特定于应用程序的遥测数据,并将其转发到 Cortex。 这允许 DevOps 团队以可扩展、查询高效的格式监控特定于应用程序的 KPI,同时保持指标按租户或服务进行逻辑分组。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。 当您将任何数据视为时序数据时,它都更有价值。 使用 InfluxDB,第一时序平台,它与 Telegraf 一起构建以实现扩展。
查看入门方法