目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。 使用 InfluxDB,排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
Kinesis 插件使您能够从 Kinesis 数据流中读取数据,支持各种数据格式和配置。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace 进行监控和分析。 这种集成增强了系统和应用程序的可观察性,为性能和运行状况提供了宝贵的见解。
集成详情
Kinesis
Kinesis Telegraf 插件旨在从 Amazon Kinesis 数据流中读取数据,使使用者能够实时收集指标。 作为服务输入插件,它通过监听传入数据而不是定期轮询来运行。 配置指定了各种选项,包括 AWS 区域、流名称、身份验证凭据和数据格式。 它支持跟踪未送达的消息以防止数据丢失,并且使用者可以利用 DynamoDB 来维护上次处理记录的检查点。 此插件对于需要可靠且可扩展的流处理以及其他监控需求的应用程序特别有用。
Dynatrace
Telegraf 的 Dynatrace 插件有助于通过 Dynatrace Metrics API V2 将指标传输到 Dynatrace 平台。 此插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者自动执行身份验证,或者它可以以独立配置运行,这需要手动指定 URL 和 API 令牌,以用于没有 OneAgent 的环境。 除非明确配置为使用可用的配置选项将某些指标视为增量计数器,否则该插件主要将指标报告为计量器。 此功能使使用者能够自定义发送到 Dynatrace 的指标的行为,从而利用平台的强大功能进行全面的性能监控和可观察性。 对于使用者来说,确保 Dynatrace 和 Telegraf 都符合版本要求至关重要,从而在与 Dynatrace 生态系统集成时优化兼容性和性能。
配置
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"
Dynatrace
[[outputs.dynatrace]]
## For usage with the Dynatrace OneAgent you can omit any configuration,
## the only requirement is that the OneAgent is running on the same host.
## Only setup environment url and token if you want to monitor a Host without the OneAgent present.
##
## Your Dynatrace environment URL.
## For Dynatrace OneAgent you can leave this empty or set it to "http://127.0.0.1:14499/metrics/ingest" (default)
## For Dynatrace SaaS environments the URL scheme is "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest"
## For Dynatrace Managed environments the URL scheme is "https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest"
url = ""
## Your Dynatrace API token.
## Create an API token within your Dynatrace environment, by navigating to Settings > Integration > Dynatrace API
## The API token needs data ingest scope permission. When using OneAgent, no API token is required.
api_token = ""
## Optional prefix for metric names (e.g.: "telegraf")
prefix = "telegraf"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Optional flag for ignoring tls certificate check
# insecure_skip_verify = false
## Connection timeout, defaults to "5s" if not set.
timeout = "5s"
## If you want metrics to be treated and reported as delta counters, add the metric names here
additional_counters = [ ]
## In addition or as an alternative to additional_counters, if you want metrics to be treated and
## reported as delta counters using regular expression pattern matching
additional_counters_patterns = [ ]
## NOTE: Due to the way TOML is parsed, tables must be at the END of the
## plugin definition, otherwise additional config options are read as part of the
## table
## Optional dimensions to be added to every metric
# [outputs.dynatrace.default_dimensions]
# default_key = "default value"
输入和输出集成示例
Kinesis
-
使用 Kinesis 进行实时数据处理:此用例涉及将 Kinesis 插件与监控仪表板集成,以实时分析传入的数据指标。 例如,应用程序可以从多个服务使用日志并在视觉上呈现它们,从而使运营团队能够快速识别趋势并对异常情况做出反应。
-
无服务器日志聚合:在无服务器架构中使用此插件,其中 Kinesis 流聚合来自各种微服务的日志。 该插件可以创建指标来帮助检测系统中的问题,通过第三方集成自动执行警报流程,使团队能够最大程度地减少停机时间并提高可靠性。
-
基于流指标的动态扩展:实施一种解决方案,其中 Kinesis 插件使用的流指标可用于动态调整资源。 例如,如果处理的记录数激增,则可以触发相应的横向扩展操作来处理增加的负载,从而确保最佳的资源分配和性能。
-
使用检查点将数据管道传输到 S3:创建一个强大的数据管道,其中 Kinesis 流数据通过 Telegraf Kinesis 插件进行处理,检查点存储在 DynamoDB 中。 这种方法可以确保数据一致性和可靠性,因为它管理已处理数据的状态,从而实现与下游数据湖或存储解决方案的无缝集成。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace 中。 这种集成提供了资源利用率、应用程序性能和系统运行状况的整体视图,从而能够主动响应各种云环境中的性能问题。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标来实施自定义应用程序特定指标。 通过利用额外的计数器和维度选项,开发团队可以获得与应用程序的运营需求精确对齐的见解,从而可以进行有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。 通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。
-
基于指标更改的自动警报:将 Dynatrace 输出插件与警报机制集成,当特定指标超过定义的阈值时触发通知。 这种情况涉及配置额外的计数器来监控关键的应用程序性能指标,从而能够快速采取补救措施以维持服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。 使用 InfluxDB,排名第一的时间序列平台,旨在与 Telegraf 一起扩展。
查看入门方法