目录
输入和输出集成概述
此插件监听通过 HTTP 从 AWS Data Firehose 以受支持的数据格式发送的指标,提供实时数据摄取功能。
此插件使用基于 HTTP 的 Prometheus 远程写入协议将指标从 Telegraf 发送到 Thanos,从而可以高效且可扩展地摄取到 Thanos Receive 组件中。
集成详情
AWS Data Firehose
AWS Data Firehose Telegraf 插件旨在通过 HTTP 接收来自 AWS Data Firehose 的指标。此插件监听各种格式的传入数据,并根据 AWS 官方文档中概述的请求-响应模式对其进行处理。与以固定间隔运行的标准输入插件不同,此服务插件初始化一个保持活动的监听器,等待传入的指标。这允许从 AWS Data Firehose 实时摄取数据,使其适用于需要立即进行数据处理的场景。主要功能包括指定服务地址、路径以及支持 TLS 连接以实现安全数据传输的能力。此外,该插件还支持可选的身份验证密钥和自定义标签,从而增强了其在涉及数据流和处理的各种用例中的灵活性。
Thanos
Telegraf 的 HTTP 插件可以通过其兼容远程写入的 Receive 组件将指标直接发送到 Thanos。通过将数据格式设置为 prometheusremotewrite,Telegraf 可以将指标序列化为本机 Prometheus 客户端使用的相同基于 protobuf 的格式。此设置实现了高吞吐量、低延迟的指标摄取到 Thanos 中,从而促进了大规模的集中式可观测性。它在混合环境中特别有用,在这些环境中,Telegraf 从 Prometheus 原生范围之外的系统(例如 SNMP 设备、Windows 主机或自定义应用程序)收集指标,并将它们直接流式传输到 Thanos 以进行长期存储和全局查询。
配置
AWS Data Firehose
[[inputs.firehose]]
## Address and port to host HTTP listener on
service_address = ":8080"
## Paths to listen to.
# paths = ["/telegraf"]
## maximum duration before timing out read of the request
# read_timeout = "5s"
## maximum duration before timing out write of the response
# write_timeout = "5s"
## Set one or more allowed client CA certificate file names to
## enable mutually authenticated TLS connections
# tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
## Add service certificate and key
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Minimal TLS version accepted by the server
# tls_min_version = "TLS12"
## Optional access key to accept for authentication.
## AWS Data Firehose uses "x-amz-firehose-access-key" header to set the access key.
## If no access_key is provided (default), authentication is completely disabled and
## this plugin will accept all request ignoring the provided access-key in the request!
# access_key = "foobar"
## Optional setting to add parameters as tags
## If the http header "x-amz-firehose-common-attributes" is not present on the
## request, no corresponding tag will be added. The header value should be a
## json and should follow the schema as describe in the official documentation:
## https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html#requestformat
# parameter_tags = ["env"]
## 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"
Thanos
[[outputs.http]]
## Thanos Receive endpoint for remote write
url = "http://thanos-receive.example.com/api/v1/receive"
## HTTP method
method = "POST"
## Data format set to Prometheus remote write
data_format = "prometheusremotewrite"
## Optional headers (authorization, etc.)
# [outputs.http.headers]
# Authorization = "Bearer YOUR_TOKEN"
## Optional TLS configuration
# tls_ca = "/path/to/ca.pem"
# tls_cert = "/path/to/cert.pem"
# tls_key = "/path/to/key.pem"
# insecure_skip_verify = false
## Request timeout
timeout = "10s"
输入和输出集成示例
AWS Data Firehose
-
实时数据分析:通过使用 AWS Data Firehose 插件,组织可以将来自各种来源(例如应用程序日志或物联网设备)的数据实时流式传输到分析平台中。这使数据团队能够分析传入数据,从而根据最新的指标快速获得见解和进行操作调整。
-
分析访问模式以进行优化:通过 AWS Data Firehose 收集有关客户端如何与应用程序交互的数据,企业可以深入了解用户行为。这可以推动内容个性化策略或根据流量模式优化服务器架构以获得更好的性能。
-
自动化警报机制:通过此插件将 AWS Data Firehose 与警报系统集成,使团队能够根据收集的特定指标设置自动化警报。例如,如果在输入数据中达到特定阈值,则警报可以触发运营团队调查潜在问题,以防问题升级。
Thanos
-
无代理云监控:在云虚拟机上部署 Telegraf 代理以收集系统和应用程序指标,然后使用远程写入将它们直接流式传输到 Thanos。这提供了集中式可观测性,而无需在每个位置都部署 Prometheus 节点。
-
可扩展的 Windows 主机监控:在 Windows 机器上使用 Telegraf 收集操作系统级别的指标,并通过远程写入将它们发送到 Thanos Receive。这实现了跨异构环境的可观测性,而本机 Prometheus 仅在 Linux 上受支持。
-
跨区域指标联合:多个地理区域中的 Telegraf 代理可以使用此插件将数据推送到区域本地的 Thanos Receiver。从那里,Thanos 可以全局重复数据删除和查询指标,从而减少延迟和网络出口成本。
-
将第三方数据集成到 Thanos 中:使用 Telegraf 输入从自定义遥测源(例如 REST API 或专有日志)收集指标,并通过远程写入将它们转发到 Thanos。这会将非原生数据引入到与 Prometheus 兼容的长期分析管道中。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。