目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
Kinesis 插件使您可以从 Kinesis 数据流中读取数据,支持各种数据格式和配置。
该插件使 Telegraf 能够将指标直接流式传输到 Grafana 仪表板,利用 Grafana Live 进行即时数据可视化和操作洞察。
集成详情
Kinesis
Kinesis Telegraf 插件旨在从 Amazon Kinesis 数据流中读取数据,使用户能够实时收集指标。作为服务输入插件,它通过监听传入数据而不是定期轮询来运行。配置指定了各种选项,包括 AWS 区域、流名称、身份验证凭据和数据格式。它支持跟踪未送达的消息以防止数据丢失,用户可以利用 DynamoDB 来维护上次处理记录的检查点。此插件对于需要可靠且可扩展的流处理以及其他监控需求的应用程序特别有用。
Grafana
Telegraf 可以使用 Websocket 输出插件将实时数据发送到 Grafana。Telegraf 收集的指标会立即推送到 Grafana 仪表板,从而实现实时可视化和分析。该插件非常适合需要低延迟、实时数据可视化的用例,例如操作监控、实时分析和即时事件响应场景。它支持身份验证标头、可自定义的数据序列化格式(如 JSON)以及通过 TLS 的安全通信,在动态、交互式仪表板环境中提供灵活性和易于集成。
配置
Kinesis
# Configuration for the AWS Kinesis input.
[[inputs.kinesis_consumer]]
## Amazon REGION of kinesis endpoint.
region = "ap-southeast-2"
## Amazon Credentials
## Credentials are loaded in the following order
## 1) Web identity provider credentials via STS if role_arn and web_identity_token_file are specified
## 2) Assumed credentials via STS if role_arn is specified
## 3) explicit credentials from 'access_key' and 'secret_key'
## 4) shared profile from 'profile'
## 5) environment variables
## 6) shared credentials file
## 7) EC2 Instance Profile
# access_key = ""
# secret_key = ""
# token = ""
# role_arn = ""
# web_identity_token_file = ""
# role_session_name = ""
# profile = ""
# shared_credential_file = ""
## Endpoint to make request against, the correct endpoint is automatically
## determined and this option should only be set if you wish to override the
## default.
## ex: endpoint_url = "http://localhost:8000"
# endpoint_url = ""
## Kinesis StreamName must exist prior to starting telegraf.
streamname = "StreamName"
## Shard iterator type (only 'TRIM_HORIZON' and 'LATEST' currently supported)
# shard_iterator_type = "TRIM_HORIZON"
## Max undelivered messages
## This plugin uses tracking metrics, which ensure messages are read to
## outputs before acknowledging them to the original broker to ensure data
## is not lost. This option sets the maximum messages to read from the
## broker that have not been written by an output.
##
## This value needs to be picked with awareness of the agent's
## metric_batch_size value as well. Setting max undelivered messages too high
## can result in a constant stream of data batches to the output. While
## setting it too low may never flush the broker's messages.
# max_undelivered_messages = 1000
## 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"
##
## The content encoding of the data from kinesis
## If you are processing a cloudwatch logs kinesis stream then set this to "gzip"
## as AWS compresses cloudwatch log data before it is sent to kinesis (aws
## also base64 encodes the zip byte data before pushing to the stream. The base64 decoding
## is done automatically by the golang sdk, as data is read from kinesis)
##
# content_encoding = "identity"
## Optional
## Configuration for a dynamodb checkpoint
[inputs.kinesis_consumer.checkpoint_dynamodb]
## unique name for this consumer
app_name = "default"
table_name = "default"
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
输入和输出集成示例
Kinesis
-
使用 Kinesis 进行实时数据处理:此用例涉及将 Kinesis 插件与监控仪表板集成,以实时分析传入的数据指标。例如,应用程序可以从多个服务消费日志并以可视方式呈现它们,使运营团队能够快速识别趋势并对异常做出反应。
-
无服务器日志聚合:在无服务器架构中利用此插件,其中 Kinesis 流聚合来自各种微服务的日志。该插件可以创建有助于检测系统问题的指标,通过第三方集成自动化警报流程,使团队能够最大限度地减少停机时间并提高可靠性。
-
基于流指标的动态扩展:实施一种解决方案,其中 Kinesis 插件消费的流指标可用于动态调整资源。例如,如果处理的记录数量激增,则可以触发相应的向上扩展操作以处理增加的负载,从而确保最佳的资源分配和性能。
-
带有检查点的数据管道到 S3:创建一个强大的数据管道,其中 Kinesis 流数据通过 Telegraf Kinesis 插件处理,检查点存储在 DynamoDB 中。这种方法可以确保数据一致性和可靠性,因为它管理已处理数据的状态,从而实现与下游数据湖或存储解决方案的无缝集成。
Grafana
-
实时基础设施仪表板:部署 Telegraf 将服务器健康指标直接流式传输到 Grafana 仪表板,使 IT 团队能够实时可视化基础设施性能。此设置允许立即检测和响应关键系统事件。
-
交互式物联网监控:集成 Telegraf 收集的物联网设备指标,并将实时数据推送到 Grafana 中,从而为监控智慧城市项目或制造过程创建动态和交互式仪表板。这种实时可见性显着提高了响应能力和运营效率。
-
即时应用程序性能分析:将来自生产环境的应用程序指标实时流式传输到 Grafana 仪表板,使开发团队能够在部署期间快速检测和诊断性能瓶颈或异常,从而最大限度地减少停机时间并提高可靠性。
-
直播活动分析:在大型直播活动期间,利用 Telegraf 捕获和流式传输实时观众或系统指标,直接传输到 Grafana 仪表板。活动组织者可以动态监控并对不断变化的条件或趋势做出反应,从而显着提高观众参与度和运营决策能力。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法