目录
输入和输出集成概述
此插件从 RabbitMQ 服务器读取指标,提供对消息传递系统性能和状态的重要见解。
此插件允许使用 Metrics API 将指标发送到 New Relic Insights,从而实现对应用程序性能的有效监控和分析。
集成详情
RabbitMQ
Telegraf 的 RabbitMQ 插件允许用户通过 RabbitMQ Management Plugin 从 RabbitMQ 服务器收集指标。此功能对于监控 RabbitMQ 实例的性能和运行状况至关重要,RabbitMQ 实例广泛用于各种应用程序中的消息队列和处理。该插件提供了对关键 RabbitMQ 指标的全面洞察,包括消息速率、队列深度和节点运行状况统计信息,从而使运营商能够维护其消息传递基础设施的最佳性能和稳健性。此外,它还支持 secret-stores 以安全地管理敏感凭据,从而使与现有系统的集成更加顺畅。配置选项允许灵活地指定要监控的节点、队列和交换机,为各种部署场景提供有价值的适应性。
New Relic
此插件利用 Metrics API 将指标写入 New Relic Insights,Metrics API 提供了一种强大的机制,用于将时序数据发送到 New Relic 平台。用户必须首先获取 Insights API 密钥才能对其数据提交进行身份验证和授权。该插件旨在促进与 New Relic 的监控和分析功能轻松集成,支持各种指标类型并允许高效的数据处理。核心功能包括能够为指标添加前缀以更好地识别、API 请求的可自定义超时以及对代理设置的支持以增强连接性。用户必须根据其要求配置这些选项,以实现数据无缝流入 New Relic,从而进行全面的实时分析和洞察。
配置
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 = []
New Relic
[[outputs.newrelic]]
## The 'insights_key' parameter requires a NR license key.
## New Relic recommends you create one
## with a convenient name such as TELEGRAF_INSERT_KEY.
## reference: https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key
# insights_key = "New Relic License Key Here"
## Prefix to add to add to metric name for easy identification.
## This is very useful if your metric names are ambiguous.
# metric_prefix = ""
## Timeout for writes to the New Relic API.
# timeout = "15s"
## HTTP Proxy override. If unset use values from the standard
## proxy environment variables to determine proxy, if any.
# http_proxy = "http://corporate.proxy:3128"
## Metric URL override to enable geographic location endpoints.
# If not set use values from the standard
# metric_url = "https://metric-api.newrelic.com/metric/v1"
输入和输出集成示例
RabbitMQ
-
监控队列性能指标:使用 RabbitMQ 插件来跟踪队列性能随时间的变化。这包括设置监控仪表板,以可视化关键队列指标,例如消息速率、消费者数量和消息传递速率。通过这些信息,团队可以通过分析趋势并根据数据做出关于扩展或优化其 RabbitMQ 配置的明智决策,从而主动解决任何瓶颈或性能问题。
-
系统健康状况警报:将 RabbitMQ 插件与警报系统集成,以将 RabbitMQ 实例中潜在的问题通知运营团队。例如,如果未确认消息的数量达到临界阈值,或者队列变得不堪重负,则可以触发警报,以便立即进行调查并迅速采取补救措施,以维护消息流的健康状况。
-
分析消息处理指标:使用该插件收集关于消息处理性能的详细指标,例如已发布、已确认和已重新传递的消息的速率。通过分析这些指标,团队可以评估其消息消费者应用程序的效率,并在必要时对配置或代码进行调整,从而提高整体系统吞吐量和弹性。
-
跨系统数据集成:利用 RabbitMQ 插件收集的指标来集成 RabbitMQ 和其他系统或服务之间的数据流。例如,使用收集的指标来驱动自动化工作流程或分析管道,这些管道利用 RabbitMQ 中处理的消息,使组织能够优化工作流程并提高其生态系统中的数据敏捷性。
New Relic
-
应用程序性能监控:使用 New Relic Telegraf 插件将 Web 服务的应用程序性能指标发送到 New Relic Insights。通过集成此插件,开发人员可以收集诸如响应时间、错误率和吞吐量之类的数据,从而使团队能够实时监控应用程序运行状况,并在问题影响用户之前快速解决问题。此设置促进了应用程序性能和用户体验的主动管理。
-
基础设施指标聚合:利用此插件聚合来自各种服务器的系统级指标(CPU 使用率、内存消耗等)并将其发送到 New Relic。这有助于系统管理员维护基础设施性能的全面视图,从而促进容量规划并识别潜在的瓶颈。通过将指标集中在 New Relic 中,团队可以可视化随时间变化的趋势,并就资源分配做出明智的决策。
-
多租户应用程序的动态指标命名:使用 metric_prefix 选项实现动态前缀,以区分多租户应用程序中的不同租户。通过配置插件以在指标名称中包含每个租户的唯一标识符,团队可以分析每个租户的使用模式和性能指标。这提供了对租户行为的宝贵见解,支持定制优化并提高不同客户群的服务质量。
-
实时异常检测:将 New Relic 插件与警报机制结合使用,以根据异常指标模式触发通知。通过发送诸如请求计数和响应时间之类的指标,团队可以在 New Relic 中设置阈值,当阈值被违反时,将自动向责任方发出警报。这种用户驱动的方法支持对潜在问题做出立即响应,避免问题升级为更大的事件。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。