目录
输入和输出集成概述
此插件允许通过 Stackdriver Monitoring API 从 Google Cloud 服务收集监控数据。 它旨在通过收集相关指标来帮助用户监控其云基础设施的性能和运行状况。
此插件使 Telegraf 能够使用 InfluxDB 行协议将指标直接高效地写入 VictoriaMetrics,从而利用 VictoriaMetrics 的性能和可扩展性功能来处理大规模时序数据。
集成详情
Google Cloud Stackdriver
Stackdriver Telegraf 插件允许用户使用 Cloud Monitoring API v3 从 Google Cloud Monitoring 查询时序数据。 借助此插件,用户可以轻松地将 Google Cloud 监控指标集成到其监控堆栈中。 此 API 提供了关于在 Google Cloud 中运行的资源和应用程序的大量见解,包括性能、正常运行时间和运营指标。 该插件支持各种配置选项来过滤和优化检索到的数据,使用户能够根据其特定需求自定义其监控设置。 这种集成有助于更顺畅地维护云资源的运行状况和性能,并协助团队根据历史和当前性能统计数据做出数据驱动的决策。
VictoriaMetrics
VictoriaMetrics 支持直接以 InfluxDB 行协议摄取指标,这使得此插件成为高效实时指标存储和检索的理想选择。 该集成结合了 Telegraf 广泛的指标收集功能与 VictoriaMetrics 优化的存储和查询功能,包括压缩、快速摄取率和高效的磁盘利用率。 此插件非常适合云原生和大规模监控场景,它提供了简洁性、强大的性能和高可靠性,从而为大量指标实现高级运营见解和长期存储解决方案。
配置
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>
VictoriaMetrics
[[outputs.influxdb]]
## URL of the VictoriaMetrics write endpoint
urls = ["http://localhost:8428"]
## VictoriaMetrics accepts InfluxDB line protocol directly
database = "db_name"
## Optional authentication
# username = "username"
# password = "password"
# skip_database_creation = true
# exclude_retention_policy_tag = true
# content_encoding = "gzip"
## Timeout for HTTP requests
timeout = "5s"
## Optional TLS configuration
# tls_ca = "/path/to/ca.pem"
# tls_cert = "/path/to/cert.pem"
# tls_key = "/path/to/key.pem"
# insecure_skip_verify = false
输入和输出集成示例
Google Cloud Stackdriver
-
将云指标集成到自定义仪表板中:借助此插件,团队可以将来自 Google Cloud 的指标输送到个性化仪表板中,从而实现对应用程序性能和资源利用率的实时监控。 通过自定义云指标的可视化表示,运营团队可以轻松识别趋势和异常,从而在问题升级之前实现主动管理。
-
自动化警报和分析:用户可以设置自动化警报机制,利用插件的指标来跟踪资源阈值。 此功能使团队能够通过提供即时通知来快速响应性能下降或中断,从而缩短平均恢复时间并确保持续的运营效率。
-
跨平台资源比较:该插件可用于从各种 Google Cloud 服务中提取指标,并将它们与本地资源进行比较。 这种跨平台可见性有助于组织就资源分配和扩展策略做出明智的决策,并优化云支出与本地基础设施。
-
用于容量规划的历史数据分析:通过随着时间推移收集历史指标,该插件使团队能够进行全面的容量规划。 了解过去的性能趋势有助于准确预测资源需求,从而实现更好的预算和投资策略。
VictoriaMetrics
-
云原生应用程序监控:将部署在 Kubernetes 上的微服务的指标直接流式传输到 VictoriaMetrics。 通过集中指标,组织可以在动态发展的云环境中执行实时监控、快速异常检测和无缝可扩展性。
-
可扩展的物联网数据管理:使用该插件将来自物联网部署的传感器数据摄取到 VictoriaMetrics 中。 这种方法有助于实时分析、预测性维护以及以最小的存储开销高效管理海量传感器数据。
-
金融系统性能跟踪:通过此插件利用 VictoriaMetrics 来存储和分析来自金融系统的指标,捕获延迟、交易量和错误率。 组织可以快速识别和解决性能瓶颈,确保高可用性和法规遵从性。
-
跨环境性能仪表板:将来自不同基础设施组件(例如云实例、容器和物理服务器)的指标集成到 VictoriaMetrics 中。 使用可视化工具,团队可以构建全面的仪表板,以实现端到端性能可见性、主动故障排除和基础设施优化。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。