目录
输入和输出集成概述
此插件与 Apache HTTP 服务器的 mod_status 接口,以收集和报告服务器的性能指标。
Sumo Logic 插件旨在方便地将指标从 Telegraf 发送到 Sumo Logic 的 HTTP 源。通过使用此插件,用户可以在 Sumo Logic 平台上分析其指标数据,利用各种输出数据格式。
集成详情
Apache
Apache 插件使用 Apache HTTP 服务器的 mod_status 模块收集服务器性能信息。它依赖于 mod_status 功能,该功能必须在 Apache 配置中显式启用才能访问机器可读的状态页面。此插件允许用户获取多个与 Apache 运行性能相关的指标,包括工作进程状态、连接统计信息和服务器负载,从而有助于实时有效地监控和排除 Web 服务器性能故障。
Sumo Logic
此插件方便将指标传输到 Sumo Logic 的 HTTP 源,并采用指定的数据格式用于 HTTP 消息。Telegraf(必须是 1.16.0 或更高版本)可以发送以多种格式编码的指标,包括 graphite
、carbon2
和 prometheus
。这些格式对应于 Sumo Logic 识别的不同内容类型,确保指标被正确解释以进行分析。与 Sumo Logic 的集成允许用户利用全面的分析平台,从而从其指标数据中获得丰富的可视化效果和见解。该插件提供配置选项,例如设置 HTTP 指标源的 URL、选择数据格式以及指定超时和请求大小等附加参数,从而增强了数据监控工作流程的灵活性和控制力。
配置
Apache
[[inputs.apache]]
## An array of URLs to gather from, must be directed at the machine
## readable version of the mod_status page including the auto query string.
## Default is "http://localhost/server-status?auto".
urls = ["http://localhost/server-status?auto"]
## Credentials for basic HTTP authentication.
# username = "myuser"
# password = "mypassword"
## Maximum time to receive response.
# response_timeout = "5s"
## 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
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>
输入和输出集成示例
Apache
-
实时性能监控:使用 Apache 输入插件设置实时仪表板,显示 Apache 服务器的关键性能指标。通过可视化诸如 BusyWorkers 和平均负载等指标,您可以快速识别性能瓶颈和服务器健康问题,从而帮助主动管理 Web 流量负载。
-
服务器问题自动警报:实施基于此插件收集的指标的警报,以便在性能下降时通知管理员。例如,如果
BusyWorkers
指标超过某个阈值,则可以触发自动警报,从而确保及时响应事件,以维护正常运行时间和服务的可靠性。 -
历史性能分析:将 Apache 插件收集的数据与长期存储解决方案结合使用,以跟踪一段时间内的性能趋势。这种累积的数据有助于了解使用模式、预测资源需求以及就服务器扩展或优化做出明智的决策。
-
跨系统监控:使用 Telegraf 的功能将从 Apache 收集的指标与 Web 堆栈其他组件的指标集成,以将数据发送到集中式监控解决方案。这种全面的视图可以简化不同技术之间的故障排除和协调,从而确保整个系统的最佳性能。
Sumo Logic
-
实时系统监控仪表板:利用 Sumo Logic 插件将服务器的性能指标持续馈送到 Sumo Logic 仪表板中。此设置允许技术团队实时可视化系统健康状况和负载,从而通过详细的图表和指标更快地识别任何性能瓶颈或系统故障。
-
自动警报系统:配置插件以发送指标,这些指标会在 Sumo Logic 中触发针对特定阈值的警报,例如 CPU 使用率或内存消耗。通过设置自动警报,团队可以在问题升级为严重故障之前主动解决问题,从而显着缩短响应时间并提高整体系统可靠性。
-
跨系统指标聚合:跨不同环境(开发、测试、生产)集成多个 Telegraf 实例,并使用此插件将所有指标汇集到中央 Sumo Logic 实例。这种聚合支持跨环境的全面分析,从而促进更好的监控和跨软件开发生命周期的明智决策。
-
具有维度跟踪的自定义指标:使用 Sumo Logic 插件发送自定义指标,其中包括识别基础设施各个方面的维度(例如,环境、服务类型)。这种精细的跟踪允许更定制化的分析,使您的团队能够剖析不同应用程序层或业务功能的性能。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。