目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它会变得更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 协同扩展。
查看入门方法
输入和输出集成概述
此插件可以通过 Stackdriver Monitoring API 收集来自 Google Cloud 服务的监控数据。它旨在通过收集相关指标来帮助用户监控其云基础设施的性能和健康状况。
Graphite 插件使用户能够通过 TCP 将 Telegraf 收集的指标发送到 Graphite。此集成允许使用 Graphite 的强大功能高效存储和可视化时间序列数据。
集成详情
Google Cloud Stackdriver
Stackdriver Telegraf 插件允许用户使用 Cloud Monitoring API v3 从 Google Cloud Monitoring 查询时间序列数据。借助此插件,用户可以轻松地将 Google Cloud 监控指标集成到其监控堆栈中。此 API 提供了关于 Google Cloud 中运行的资源和应用程序的大量见解,包括性能、正常运行时间和运营指标。该插件支持各种配置选项来过滤和优化检索到的数据,使用户能够根据其特定需求自定义监控设置。此集成有助于更顺畅地维护云资源的健康和性能,并协助团队根据历史和当前性能统计数据做出数据驱动的决策。
Graphite
此插件通过原始 TCP 将指标写入 Graphite,从而允许将 Telegraf 收集的指标无缝集成到 Graphite 生态系统中。借助此插件,用户可以配置多个 TCP 端点以进行负载均衡,从而确保指标传输的高可用性和可靠性。使用前缀自定义指标命名以及利用各种模板选项的功能增强了数据在 Graphite 中表示方式的灵活性。此外,对 Graphite 标签的支持以及对指标名称进行严格清理的选项允许强大的数据管理,满足用户的各种需求。对于希望利用 Graphite 强大的指标存储和可视化功能,同时保持对数据表示方式的控制的组织来说,此功能至关重要。
配置
Google Cloud Stackdriver
[[inputs.stackdriver]]
## GCP Project
project = "erudite-bloom-151019"
## Include timeseries that start with the given metric type.
metric_type_prefix_include = [
"compute.googleapis.com/",
]
## Exclude timeseries that start with the given metric type.
# metric_type_prefix_exclude = []
## Most metrics are updated no more than once per minute; it is recommended
## to override the agent level interval with a value of 1m or greater.
interval = "1m"
## Maximum number of API calls to make per second. The quota for accounts
## varies, it can be viewed on the API dashboard:
## https://cloud.google.com/monitoring/quotas#quotas_and_limits
# rate_limit = 14
## The delay and window options control the number of points selected on
## each gather. When set, metrics are gathered between:
## start: now() - delay - window
## end: now() - delay
#
## Collection delay; if set too low metrics may not yet be available.
# delay = "5m"
#
## If unset, the window will start at 1m and be updated dynamically to span
## the time between calls (approximately the length of the plugin interval).
# window = "1m"
## TTL for cached list of metric types. This is the maximum amount of time
## it may take to discover new metrics.
# cache_ttl = "1h"
## If true, raw bucket counts are collected for distribution value types.
## For a more lightweight collection, you may wish to disable and use
## distribution_aggregation_aligners instead.
# gather_raw_distribution_buckets = true
## Aggregate functions to be used for metrics whose value type is
## distribution. These aggregate values are recorded in in addition to raw
## bucket counts; if they are enabled.
##
## For a list of aligner strings see:
## https://cloud.google.com/monitoring/api/ref_v3/rpc/google.monitoring.v3#aligner
# distribution_aggregation_aligners = [
# "ALIGN_PERCENTILE_99",
# "ALIGN_PERCENTILE_95",
# "ALIGN_PERCENTILE_50",
# ]
## Filters can be added to reduce the number of time series matched. All
## functions are supported: starts_with, ends_with, has_substring, and
## one_of. Only the '=' operator is supported.
##
## The logical operators when combining filters are defined statically using
## the following values:
## filter ::= {AND AND AND }
## resource_labels ::= {OR }
## metric_labels ::= {OR }
## user_labels ::= {OR }
## system_labels ::= {OR }
##
## For more details, see https://cloud.google.com/monitoring/api/v3/filters
#
## Resource labels refine the time series selection with the following expression:
## resource.labels. =
# [[inputs.stackdriver.filter.resource_labels]]
# key = "instance_name"
# value = 'starts_with("localhost")'
#
## Metric labels refine the time series selection with the following expression:
## metric.labels. =
# [[inputs.stackdriver.filter.metric_labels]]
# key = "device_name"
# value = 'one_of("sda", "sdb")'
#
## User labels refine the time series selection with the following expression:
## metadata.user_labels."" =
# [[inputs.stackdriver.filter.user_labels]]
# key = "environment"
# value = 'one_of("prod", "staging")'
#
## System labels refine the time series selection with the following expression:
## metadata.system_labels."" =
# [[inputs.stackdriver.filter.system_labels]]
# key = "machine_type"
# value = 'starts_with("e2-")'
</code></pre>
Graphite
# Configuration for Graphite server to send metrics to
[[outputs.graphite]]
## TCP endpoint for your graphite instance.
## If multiple endpoints are configured, the output will be load balanced.
## Only one of the endpoints will be written to with each iteration.
servers = ["localhost:2003"]
## Local address to bind when connecting to the server
## If empty or not set, the local address is automatically chosen.
# local_address = ""
## Prefix metrics name
prefix = ""
## Graphite output template
## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
template = "host.tags.measurement.field"
## Strict sanitization regex
## This is the default sanitization regex that is used on data passed to the
## graphite serializer. Users can add additional characters here if required.
## Be aware that the characters, '/' '@' '*' are always replaced with '_',
## '..' is replaced with '.', and '\' is removed even if added to the
## following regex.
# graphite_strict_sanitize_regex = '[^a-zA-Z0-9-:._=\p{L}]'
## Enable Graphite tags support
# graphite_tag_support = false
## Applied sanitization mode when graphite tag support is enabled.
## * strict - uses the regex specified above
## * compatible - allows for greater number of characters
# graphite_tag_sanitize_mode = "strict"
## Character for separating metric name and field for Graphite tags
# graphite_separator = "."
## Graphite templates patterns
## 1. Template for cpu
## 2. Template for disk*
## 3. Default template
# templates = [
# "cpu tags.measurement.host.field",
# "disk* measurement.field",
# "host.measurement.tags.field"
#]
## timeout in seconds for the write connection to graphite
# timeout = "2s"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
输入和输出集成示例
Google Cloud Stackdriver
-
将云指标集成到自定义仪表板中:借助此插件,团队可以将来自 Google Cloud 的指标汇集到个性化仪表板中,从而可以实时监控应用程序性能和资源利用率。通过自定义云指标的可视化表示,运营团队可以轻松识别趋势和异常,从而在问题升级之前进行主动管理。
-
自动化警报和分析:用户可以设置自动化警报机制,利用插件的指标来跟踪资源阈值。此功能使团队能够通过提供即时通知来快速响应性能下降或中断,从而缩短平均恢复时间并确保持续的运营效率。
-
跨平台资源比较:该插件可用于提取来自各种 Google Cloud 服务的指标,并将它们与本地资源进行比较。这种跨平台可见性有助于组织就资源分配和扩展策略做出明智的决策,并优化云支出与本地基础设施。
-
用于容量规划的历史数据分析:通过长期收集历史指标,该插件使团队能够进行全面的容量规划。了解过去的绩效趋势有助于准确预测资源需求,从而实现更好的预算和投资策略。
Graphite
-
动态指标可视化:Graphite 插件可用于将来自各种来源(例如应用程序性能数据或服务器健康指标)的实时指标馈送到 Graphite 中。这种动态集成使团队能够创建交互式仪表板,以可视化关键绩效指标、跟踪随时间变化的趋势,并做出数据驱动的决策以增强系统性能。
-
负载均衡的指标收集:通过在插件中配置多个 TCP 端点,组织可以实现指标传输的负载均衡。此用例确保指标交付既具有弹性又高效,从而降低了高流量期间数据丢失的风险,并保持了向 Graphite 的可靠信息流。
-
自定义指标标记:借助对 Graphite 标签的支持,用户可以使用 Graphite 插件来增强其指标的粒度。使用相关信息(例如应用程序环境或服务类型)标记指标可以实现更精细的查询和分析,从而使团队能够深入研究特定感兴趣的领域,以获得更好的运营见解。
-
增强的数据清理:利用插件的严格清理选项,用户可以确保其指标名称符合 Graphite 的要求。这种主动措施消除了指标名称中无效字符可能引起的问题,从而实现了更清晰的数据管理和更准确的可视化。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它会变得更有价值。InfluxDB 是排名第一的时间序列平台,旨在与 Telegraf 协同扩展。
查看入门方法