目录
输入和输出集成概述
Fluentd 输入插件从 Fluentd 的 in_monitor 插件端点收集指标。 它提供对各种插件指标的洞察,同时允许自定义配置以减少序列基数。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace 进行监控和分析。 这种集成增强了系统和应用程序的可观察性,为性能和运行状况提供了有价值的见解。
集成详情
Fluentd
此插件从 in_monitor 插件提供的 Fluentd 插件端点收集指标。 它从 /api/plugin.json 资源读取数据,并允许根据插件类型排除特定插件。
Dynatrace
Telegraf 的 Dynatrace 插件有助于通过 Dynatrace Metrics API V2 将指标传输到 Dynatrace 平台。 此插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者自动执行身份验证;或者它可以在独立配置中运行,后者需要手动指定 URL 和 API 令牌以用于没有 OneAgent 的环境。 除非明确配置为使用可用的配置选项将某些指标视为增量计数器,否则该插件主要将指标报告为仪表。 此功能使用户能够自定义发送到 Dynatrace 的指标的行为,从而利用该平台的强大功能进行全面的性能监控和可观察性。 对于用户而言,确保 Dynatrace 和 Telegraf 均符合版本要求至关重要,从而在与 Dynatrace 生态系统集成时优化兼容性和性能。
配置
Fluentd
[[inputs.fluentd]]
## This plugin reads information exposed by fluentd (using /api/plugins.json endpoint).
##
## Endpoint:
## - only one URI is allowed
## - https is not supported
endpoint = "http://localhost:24220/api/plugins.json"
## Define which plugins have to be excluded (based on "type" field - e.g. monitor_agent)
exclude = [
"monitor_agent",
"dummy",
]
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"
输入和输出集成示例
Fluentd
- 基本配置:设置 Fluentd 输入插件以从您的 Fluentd 实例的监控端点收集指标,确保您能够跟踪性能和使用情况统计信息。
- 排除插件:使用
exclude
选项忽略特定插件的指标,这些指标对于您的监控需求不是必需的,从而简化数据收集并专注于重要事项。 - 自定义插件 ID:在您的 Fluentd 配置中实现 `@id` 参数以保持一致的 `plugin_id`,这有助于避免频繁重启期间出现高序列基数的问题。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件来监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace。 这种集成提供了资源利用率、应用程序性能和系统运行状况的整体视图,从而能够主动响应各种云环境中的性能问题。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,来实现自定义的应用程序特定指标。 通过利用额外的计数器和维度选项,开发团队可以获得与应用程序的运营需求精确对齐的见解,从而实现有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。 通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期发现性能异常。
-
基于指标更改的自动警报:将 Dynatrace 输出插件与警报机制集成,该机制在特定指标超过定义的阈值时触发通知。 这种情况涉及配置额外的计数器来监控关键的应用程序性能指标,从而能够快速采取补救措施以保持服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。