目录
输入和输出集成概述
此插件监听通过 HTTP 从 AWS Data Firehose 以支持的数据格式发送的指标,提供实时数据摄取功能。
此插件使 Telegraf 能够将指标直接流式传输到 Grafana 仪表板,利用 Grafana Live 实现即时数据可视化和运营洞察。
集成详情
AWS Data Firehose
AWS Data Firehose Telegraf 插件旨在通过 HTTP 接收来自 AWS Data Firehose 的指标。此插件监听各种格式的传入数据,并根据官方 AWS 文档中概述的请求-响应模式对其进行处理。与以固定间隔运行的标准输入插件不同,此服务插件初始化一个保持活动状态的监听器,等待传入指标。这允许从 AWS Data Firehose 实时摄取数据,使其适用于需要立即进行数据处理的场景。主要功能包括指定服务地址、路径以及支持 TLS 连接以实现安全数据传输的能力。此外,该插件还支持可选的身份验证密钥和自定义标签,从而增强了其在各种涉及数据流和处理的用例中的灵活性。
Grafana
Telegraf 可以使用 Websocket 输出插件将实时数据发送到 Grafana。Telegraf 收集的指标会立即推送到 Grafana 仪表板,从而实现实时可视化和分析。此插件非常适合需要低延迟、实时数据可视化的用例,例如运营监控、实时分析和即时事件响应场景。它支持身份验证标头、可自定义的数据序列化格式(如 JSON)以及通过 TLS 进行的安全通信,从而在动态、交互式仪表板环境中提供灵活性和易于集成性。
配置
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"
Grafana
[[outputs.websocket]]
## Grafana Live WebSocket endpoint
url = "ws://localhost:3000/api/live/push/custom_id"
## Optional headers for authentication
# [outputs.websocket.headers]
# Authorization = "Bearer YOUR_GRAFANA_API_TOKEN"
## Data format to send metrics
data_format = "influx"
## Timeouts (make sure read_timeout is larger than server ping interval or set to zero).
# connect_timeout = "30s"
# write_timeout = "30s"
# read_timeout = "30s"
## Optionally turn on using text data frames (binary by default).
# use_text_frames = false
## TLS configuration
# tls_ca = "/path/to/ca.pem"
# tls_cert = "/path/to/cert.pem"
# tls_key = "/path/to/key.pem"
# insecure_skip_verify = false
输入和输出集成示例
AWS Data Firehose
-
实时数据分析:通过使用 AWS Data Firehose 插件,组织可以将来自各种来源(如应用程序日志或物联网设备)的实时数据直接流式传输到分析平台。这使数据团队能够分析生成的传入数据,从而根据最新的指标实现快速洞察和运营调整。
-
优化分析访问模式:通过收集有关客户端如何通过 AWS Data Firehose 与应用程序交互的数据,企业可以获得有关用户行为的宝贵见解。这可以推动内容个性化策略或优化服务器架构,以根据流量模式获得更好的性能。
-
自动化警报机制:通过此插件将 AWS Data Firehose 与警报系统集成,团队可以根据收集的特定指标设置自动化警报。例如,如果输入数据中达到特定阈值,则警报可以触发运营团队调查潜在问题,以防问题升级。
Grafana
-
实时基础设施仪表板:部署 Telegraf 将服务器运行状况指标直接流式传输到 Grafana 仪表板,使 IT 团队能够实时可视化基础设施性能。此设置允许立即检测和响应关键系统事件。
-
交互式物联网监控:集成 Telegraf 收集的物联网设备指标,并将实时数据推送到 Grafana,从而创建动态和交互式仪表板,用于监控智慧城市项目或制造过程。这种实时可见性显著提高了响应能力和运营效率。
-
即时应用程序性能分析:将来自生产环境的应用程序指标实时流式传输到 Grafana 仪表板,使开发团队能够在部署期间快速检测和诊断性能瓶颈或异常,从而最大限度地减少停机时间并提高可靠性。
-
在线活动分析:在大型在线活动期间,利用 Telegraf 捕获和流式传输实时受众或系统指标,直接传输到 Grafana 仪表板。活动组织者可以动态监控并对不断变化的条件或趋势做出反应,从而显著提高受众参与度和运营决策能力。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。