目录
输入和输出集成概述
NSQ Telegraf 插件从 NSQD 消息系统中读取指标,从而实现实时数据处理和监控。
Sumo Logic 插件旨在方便将指标从 Telegraf 发送到 Sumo Logic 的 HTTP 源。 通过使用此插件,用户可以在 Sumo Logic 平台上分析其指标数据,利用各种输出数据格式。
集成详情
NSQ
NSQ 插件与 NSQ(实时消息平台)接口,从而可以从 NSQD 读取消息。 此插件被归类为服务插件,这意味着它主动监听指标和事件,而不是定期轮询它们。 为了强调可靠性,它通过跟踪未传递的消息直到输出确认它们来防止数据丢失。 该插件允许进行配置,例如指定 NSQLookupd 端点、主题和通道,并且它支持多种数据格式,以实现数据处理的灵活性。
Sumo Logic
此插件方便将指标传输到 Sumo Logic 的 HTTP 源,并为 HTTP 消息采用指定的数据格式。 Telegraf(版本必须为 1.16.0 或更高版本)可以发送以多种格式编码的指标,包括 graphite、carbon2 和 prometheus。 这些格式对应于 Sumo Logic 识别的不同内容类型,确保正确解释指标以进行分析。 与 Sumo Logic 集成使用户能够利用全面的分析平台,从而可以从其指标数据中获得丰富的可视化效果和见解。 该插件提供了配置选项,例如设置 HTTP 指标源的 URL、选择数据格式以及指定超时和请求大小等其他参数,从而增强了数据监控工作流程的灵活性和控制力。
配置
NSQ
# Read metrics from NSQD topic(s)
[[inputs.nsq_consumer]]
## Server option still works but is deprecated, we just prepend it to the nsqd array.
# server = "localhost:4150"
## An array representing the NSQD TCP HTTP Endpoints
nsqd = ["localhost:4150"]
## An array representing the NSQLookupd HTTP Endpoints
nsqlookupd = ["localhost:4161"]
topic = "telegraf"
channel = "consumer"
max_in_flight = 100
## Max undelivered messages
## This plugin uses tracking metrics, which ensure messages are read to
## outputs before acknowledging them to the original broker to ensure data
## is not lost. This option sets the maximum messages to read from the
## broker that have not been written by an output.
##
## This value needs to be picked with awareness of the agent's
## metric_batch_size value as well. Setting max undelivered messages too high
## can result in a constant stream of data batches to the output. While
## setting it too low may never flush the broker's messages.
# max_undelivered_messages = 1000
## Data format to consume.
## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
Sumo Logic
[[outputs.sumologic]]
## Unique URL generated for your HTTP Metrics Source.
## This is the address to send metrics to.
# url = "https://events.sumologic.net/receiver/v1/http/"
## Data format to be used for sending metrics.
## This will set the "Content-Type" header accordingly.
## Currently supported formats:
## * graphite - for Content-Type of application/vnd.sumologic.graphite
## * carbon2 - for Content-Type of application/vnd.sumologic.carbon2
## * prometheus - for Content-Type of application/vnd.sumologic.prometheus
##
## More information can be found at:
## https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#content-type-headers-for-metrics
##
## NOTE:
## When unset, telegraf will by default use the influx serializer which is currently unsupported
## in HTTP Source.
data_format = "carbon2"
## Timeout used for HTTP request
# timeout = "5s"
## Max HTTP request body size in bytes before compression (if applied).
## By default 1MB is recommended.
## NOTE:
## Bear in mind that in some serializer a metric even though serialized to multiple
## lines cannot be split any further so setting this very low might not work
## as expected.
# max_request_body_size = 1000000
## Additional, Sumo specific options.
## Full list can be found here:
## https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#supported-http-headers
## Desired source name.
## Useful if you want to override the source name configured for the source.
# source_name = ""
## Desired host name.
## Useful if you want to override the source host configured for the source.
# source_host = ""
## Desired source category.
## Useful if you want to override the source category configured for the source.
# source_category = ""
## Comma-separated key=value list of dimensions to apply to every metric.
## Custom dimensions will allow you to query your metrics at a more granular level.
# dimensions = ""
</code></pre>
输入和输出集成示例
NSQ
-
实时分析仪表板:将此插件与可视化工具集成,以创建显示来自 NSQ 中各种主题的实时指标的仪表板。 通过订阅特定主题,用户可以动态监控系统健康状况和应用程序性能,从而可以立即洞察并及时响应任何异常。
-
事件驱动的自动化:将 NSQ 与无服务器架构相结合,以根据传入消息触发自动化工作流程。 此用例可能涉及处理机器学习模型的数据或响应应用程序中的用户操作,从而通过快速处理来简化操作并增强用户体验。
-
多服务通信中心:使用 NSQ 插件充当分布式架构中不同微服务之间的集中消息中心。 通过使服务能够通过 NSQ 进行通信,开发人员可以确保可靠的消息传递,同时保持解耦的服务交互,从而显着提高可伸缩性和弹性。
-
指标聚合以增强监控:在将来自多个来源的指标发送到分析工具之前,实施 NSQ 插件以聚合这些指标。 这种设置使企业能够整合来自各种应用程序和服务的数据,从而创建统一的视图,以便更好地进行决策和战略规划。
Sumo Logic
-
实时系统监控仪表板:利用 Sumo Logic 插件将来自服务器的性能指标持续馈送到 Sumo Logic 仪表板中。 这种设置使技术团队能够实时可视化系统健康状况和负载,从而可以通过详细的图表和指标更快地识别任何性能瓶颈或系统故障。
-
自动化警报系统:配置插件以发送在 Sumo Logic 中为特定阈值(例如 CPU 使用率或内存消耗)触发警报的指标。 通过设置自动化警报,团队可以在问题升级为严重故障之前主动解决问题,从而显着缩短响应时间并提高整体系统可靠性。
-
跨系统指标聚合:跨不同环境(开发、测试、生产)集成多个 Telegraf 实例,并使用此插件将所有指标汇集到中央 Sumo Logic 实例。 这种聚合支持跨环境的全面分析,从而有助于在整个软件开发生命周期中实现更好的监控和知情的决策。
-
具有维度跟踪的自定义指标:使用 Sumo Logic 插件发送包含维度的自定义指标,这些维度标识基础设施的各个方面(例如,环境、服务类型)。 这种精细的跟踪允许进行更定制的分析,使您的团队能够剖析跨不同应用程序层或业务功能的性能。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。