目录
输入和输出集成概述
Webhooks 插件允许 Telegraf 通过 Webhooks 接收和处理来自各种外部服务的 HTTP 请求。此插件使用户能够收集实时指标和事件,并将它们集成到其监控解决方案中。
Graylog 插件允许您将 Telegraf 指标发送到 Graylog 服务器,利用 GELF 格式进行结构化日志记录。
集成详情
Webhooks
此 Telegraf 插件旨在充当 Webhook 监听器,通过启动 HTTP 服务器来注册多个 Webhook 端点。它提供了一种通过捕获发送到已定义路径的 HTTP 请求来收集来自各种服务的事件的方法。每个服务都可以配置其特定的身份验证详细信息和请求处理选项。该插件的突出之处在于允许与任何 Telegraf 输出插件集成,使其在事件驱动架构中具有通用性。通过高效接收事件,它为实时监控和响应系统开辟了可能性,这对于需要即时事件处理和处理的现代应用程序至关重要。
Graylog
Graylog 插件旨在用于将指标发送到使用 GELF(Graylog 扩展日志格式)格式的 Graylog 实例。GELF 有助于标准化日志记录数据,使系统更容易发送和分析日志。该插件遵循 GELF 规范,该规范规定了有效负载中特定字段的要求。值得注意的是,时间戳必须采用 UNIX 格式,如果存在,插件会将时间戳原样发送到 Graylog,而不会进行更改。如果省略,它会自动生成时间戳。此外,任何未由规范明确定义的额外字段都将以下划线为前缀,这有助于保持数据井井有条并符合 GELF 的要求。此功能对于实时监控应用程序和基础设施的用户尤其有价值,因为它允许跨多个系统进行无缝集成和改进的可视性。
配置
Webhooks
[[inputs.webhooks]]
## Address and port to host Webhook listener on
service_address = ":1619"
## Maximum duration before timing out read of the request
# read_timeout = "10s"
## Maximum duration before timing out write of the response
# write_timeout = "10s"
[inputs.webhooks.filestack]
path = "/filestack"
## HTTP basic auth
#username = ""
#password = ""
[inputs.webhooks.github]
path = "/github"
# secret = ""
## HTTP basic auth
#username = ""
#password = ""
[inputs.webhooks.mandrill]
path = "/mandrill"
## HTTP basic auth
#username = ""
#password = ""
[inputs.webhooks.rollbar]
path = "/rollbar"
## HTTP basic auth
#username = ""
#password = ""
[inputs.webhooks.papertrail]
path = "/papertrail"
## HTTP basic auth
#username = ""
#password = ""
[inputs.webhooks.particle]
path = "/particle"
## HTTP basic auth
#username = ""
#password = ""
[inputs.webhooks.artifactory]
path = "/artifactory"
Graylog
[[outputs.graylog]]
## Endpoints for your graylog instances.
servers = ["udp://127.0.0.1:12201"]
## Connection timeout.
# timeout = "5s"
## The field to use as the GELF short_message, if unset the static string
## "telegraf" will be used.
## example: short_message_field = "message"
# short_message_field = ""
## According to GELF payload specification, additional fields names must be prefixed
## with an underscore. Previous versions did not prefix custom field 'name' with underscore.
## Set to true for backward compatibility.
# name_field_no_prefix = false
## Connection retry options
## Attempt to connect to the endpoints if the initial connection fails.
## If 'false', Telegraf will give up after 3 connection attempt and will
## exit with an error. If set to 'true', the plugin will retry to connect
## to the unconnected endpoints infinitely.
# connection_retry = false
## Time to wait between connection retry attempts.
# connection_retry_wait_time = "15s"
## 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
输入和输出集成示例
Webhooks
-
来自 Github 的实时通知:将 Webhooks 输入插件与 Github 集成,以接收有关拉取请求、提交和问题等事件的实时通知。这使开发团队能够立即监控其存储库中的关键更改和更新,从而改善协作和响应时间。
-
使用 Rollbar 的自动警报:使用此插件监听 Rollbar 报告的错误,使团队能够快速响应生产中的错误和问题。通过将这些警报转发到集中式监控系统,团队可以根据严重程度确定响应的优先级,并防止停机时间升级。
-
来自 Filestack 的性能监控:捕获来自 Filestack 的事件以跟踪文件上传、转换和错误。此设置有助于企业了解用户与文件管理过程的交互,优化工作流程,并确保文件服务的高可用性。
-
使用 Papertrail 的集中式日志记录:通过 Webhooks 关联发送到 Papertrail 的所有日志,使您可以整合您的日志记录策略。通过实时日志转发,团队可以有效地分析趋势和异常,确保他们保持对关键操作的可见性。
Graylog
-
增强云应用程序的日志管理:使用 Graylog Telegraf 插件聚合来自跨多个服务器云部署的应用程序的日志。通过集成此插件,团队可以集中日志记录数据,从而更轻松地排除问题、监控应用程序性能并保持符合日志记录标准。
-
实时安全监控:利用 Graylog 插件收集安全相关的指标和日志,并将其发送到 Graylog 服务器进行实时分析。这使安全团队能够通过关联基础设施内各种来源的日志,快速识别异常、跟踪潜在的漏洞并及时响应事件。
-
动态警报和通知系统:实施 Graylog 插件以增强基础设施中的警报机制。通过将指标发送到 Graylog,团队可以根据日志模式或意外行为设置动态警报,从而实现主动监控和快速事件响应策略。
-
跨平台日志整合:使用 Graylog 插件来促进跨平台日志整合,跨越本地、混合和云等不同的环境。通过以 GELF 格式标准化日志记录,组织可以确保一致的监控和故障排除实践,无论其服务托管在何处。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。