目录
输入和输出集成概述
Telegraf 的 Nginx 插件旨在收集来自 Nginx Web 服务器的状态指标,提供对服务器运行指标的实时洞察。
Sumo Logic 插件旨在促进将指标从 Telegraf 发送到 Sumo Logic 的 HTTP 源。通过使用此插件,用户可以在 Sumo Logic 平台上分析他们的指标数据,利用各种输出数据格式。
集成详情
Nginx
此插件收集来自 Nginx 的状态指标。它利用 ngx_http_stub_status_module 收集与服务器性能相关的基本指标。该插件提供对活动连接、已处理请求以及各种指标当前状态的宝贵见解。此实时数据对于监控 Web 服务器性能和确保最佳运行至关重要。配置允许用户指定 Nginx 状态端点的 URL、设置超时以及在必要时配置 TLS 设置。
Sumo Logic
此插件有助于将指标传输到 Sumo Logic 的 HTTP 源,并采用指定的 HTTP 消息数据格式。 Telegraf,必须是 1.16.0 或更高版本,可以发送以多种格式编码的指标,包括 graphite、carbon2 和 prometheus。这些格式对应于 Sumo Logic 识别的不同内容类型,确保指标被正确解释以进行分析。与 Sumo Logic 的集成使用户能够利用全面的分析平台,从而从他们的指标数据中获得丰富的可视化效果和见解。该插件提供配置选项,例如设置 HTTP 指标源的 URL、选择数据格式以及指定其他参数(如超时和请求大小),这些参数增强了数据监控工作流程的灵活性和控制力。
配置
Nginx
[[inputs.nginx]]
## An array of Nginx stub_status URI to gather stats.
urls = ["http://localhost/server_status"]
## 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
## HTTP response timeout (default: 5s)
response_timeout = "5s"
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>
输入和输出集成示例
Nginx
-
Web 性能监控:使用 Nginx 插件从基础设施中各种 Nginx 服务器收集性能指标。通过在实时仪表板中可视化这些指标,团队可以跟踪性能趋势、识别瓶颈并增强 Web 应用程序的用户体验。实施此类监控使企业能够在其影响最终用户之前主动解决性能问题。
-
负载均衡器监控:将此插件与您的负载均衡器集成,以跟踪后端 Nginx 服务器的性能。通过收集诸如“活动连接”和“已处理请求”之类的统计信息,您的运维团队可以确保流量以最佳方式流动,并且没有单个服务器过载。这种主动的负载均衡方法可以防止服务停机并增强用户体验。
-
自动化警报系统:将 Nginx 插件与警报服务结合使用,以便在服务器指标超过预定义阈值时自动通知您的团队。例如,如果活动连接数过高,系统可以触发警报,以便立即采取纠正措施,从而保持服务质量和可靠性。
-
历史数据分析:将 Nginx 插件收集的指标存储在时序数据库中,以分析历史性能趋势。此分析可以揭示高流量或性能不佳的时期,从而为有关基础设施扩展和优化的数据驱动决策提供依据。通过了解过去的趋势,组织可以更好地为未来的需求做好准备。
Sumo Logic
-
实时系统监控仪表板:利用 Sumo Logic 插件将服务器的性能指标持续馈送到 Sumo Logic 仪表板中。此设置允许技术团队实时可视化系统健康状况和负载,从而通过详细的图表和指标更快地识别任何性能瓶颈或系统故障。
-
自动化警报系统:配置插件以发送在 Sumo Logic 中触发警报的指标,用于特定阈值,例如 CPU 使用率或内存消耗。通过设置自动化警报,团队可以在问题升级为严重故障之前主动解决问题,从而显着提高响应时间和整体系统可靠性。
-
跨系统指标聚合:跨不同环境(开发、测试、生产)集成多个 Telegraf 实例,并使用此插件将所有指标汇集到中央 Sumo Logic 实例。这种聚合支持跨环境的全面分析,从而促进整个软件开发生命周期中更好的监控和知情的决策。
-
具有维度跟踪的自定义指标:使用 Sumo Logic 插件发送自定义指标,其中包括标识基础设施各个方面的维度(例如,环境、服务类型)。这种精细的跟踪可以实现更定制的分析,使您的团队能够剖析跨不同应用程序层或业务功能的性能。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。