Google Cloud Stackdriver 和 Snowflake 集成

强大的性能和简单的集成,由 InfluxData 构建的开源数据连接器 Telegraf 提供支持。

info

这不是大规模实时查询的推荐配置。 为了查询和压缩优化、高速摄取和高可用性,您可能需要考虑 Stackdriver 和 InfluxDB。

50亿+

Telegraf 下载量

#1

时序数据库
来源:DB Engines

10亿+

InfluxDB 下载量

2,800+

贡献者

目录

强大的性能,无限的扩展

收集、组织和处理海量高速数据。 当您将任何数据视为时序数据时,它都更有价值。 使用 InfluxDB,第一时序平台,旨在与 Telegraf 一起扩展。

查看入门方法

输入和输出集成概述

此插件允许通过 Stackdriver Monitoring API 从 Google Cloud 服务收集监控数据。 它旨在通过收集相关指标,帮助用户监控其云基础设施的性能和健康状况。

Telegraf 的 SQL 插件允许在 SQL 数据库中无缝存储指标。 当配置为 Snowflake 时,它采用专门的 DSN 格式和动态表创建,以将指标映射到相应的架构。

集成详情

Google Cloud Stackdriver

Stackdriver Telegraf 插件允许用户使用 Cloud Monitoring API v3 从 Google Cloud Monitoring 查询时序数据。 使用此插件,用户可以轻松地将 Google Cloud 监控指标集成到其监控堆栈中。 此 API 提供了有关在 Google Cloud 中运行的资源和应用程序的丰富见解,包括性能、正常运行时间和运营指标。 该插件支持各种配置选项来过滤和优化检索到的数据,使用户能够根据其特定需求自定义其监控设置。 此集成有助于更顺畅地维护云资源的健康和性能,并协助团队根据历史和当前性能统计数据做出数据驱动的决策。

Snowflake

Telegraf 的 SQL 插件旨在通过根据传入数据创建表和列,将指标动态写入 SQL 数据库。 当配置为 Snowflake 时,它采用 gosnowflake 驱动程序,该驱动程序使用 DSN,该 DSN 以紧凑的格式封装凭据、帐户详细信息和数据库配置。 此设置允许自动生成表,其中每个指标都记录有精确的时间戳,从而确保详细的历史跟踪。 尽管该集成被认为是实验性的,但它利用了 Snowflake 强大的数据仓库功能,使其适用于可扩展的、基于云的分析和报告解决方案。

配置

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>

Snowflake

[[outputs.sql]]
  ## Database driver
  ## Valid options: mssql (Microsoft SQL Server), mysql (MySQL), pgx (Postgres),
  ## sqlite (SQLite3), snowflake (snowflake.com), clickhouse (ClickHouse)
  driver = "snowflake"

  ## Data source name
  ## For Snowflake, the DSN format typically includes the username, password, account identifier, and optional warehouse, database, and schema.
  ## Example DSN: "username:password@account/warehouse/db/schema"
  data_source_name = "username:password@account/warehouse/db/schema"

  ## Timestamp column name
  timestamp_column = "timestamp"

  ## Table creation template
  ## Available template variables:
  ##  {TABLE}        - table name as a quoted identifier
  ##  {TABLELITERAL} - table name as a quoted string literal
  ##  {COLUMNS}      - column definitions (list of quoted identifiers and types)
  table_template = "CREATE TABLE {TABLE} ({COLUMNS})"

  ## Table existence check template
  ## Available template variables:
  ##  {TABLE} - table name as a quoted identifier
  table_exists_template = "SELECT 1 FROM {TABLE} LIMIT 1"

  ## Initialization SQL (optional)
  init_sql = ""

  ## Maximum amount of time a connection may be idle. "0s" means connections are never closed due to idle time.
  connection_max_idle_time = "0s"

  ## Maximum amount of time a connection may be reused. "0s" means connections are never closed due to age.
  connection_max_lifetime = "0s"

  ## Maximum number of connections in the idle connection pool. 0 means unlimited.
  connection_max_idle = 2

  ## Maximum number of open connections to the database. 0 means unlimited.
  connection_max_open = 0

  ## Metric type to SQL type conversion
  ## Defaults to ANSI/ISO SQL types unless overridden. Adjust if needed for Snowflake compatibility.
  #[outputs.sql.convert]
  #  integer       = "INT"
  #  real          = "DOUBLE"
  #  text          = "TEXT"
  #  timestamp     = "TIMESTAMP"
  #  defaultvalue  = "TEXT"
  #  unsigned      = "UNSIGNED"
  #  bool          = "BOOL"

输入和输出集成示例

Google Cloud Stackdriver

  1. 将云指标集成到自定义仪表板中:使用此插件,团队可以将来自 Google Cloud 的指标汇集到个性化仪表板中,从而可以实时监控应用程序性能和资源利用率。 通过自定义云指标的可视化表示,运营团队可以轻松识别趋势和异常,从而在问题升级之前实现主动管理。

  2. 自动化警报和分析:用户可以设置自动化警报机制,利用插件的指标来跟踪资源阈值。 这种能力使团队能够通过提供即时通知来快速响应性能下降或中断,从而缩短平均恢复时间并确保持续的运营效率。

  3. 跨平台资源比较:该插件可用于从各种 Google Cloud 服务中提取指标,并将它们与本地资源进行比较。 这种跨平台可见性有助于组织就资源分配和扩展策略做出明智的决策,并优化云支出与本地基础设施。

  4. 用于容量规划的历史数据分析:通过长期收集历史指标,该插件使团队能够进行全面的容量规划。 了解过去的性能趋势有助于准确预测资源需求,从而实现更好的预算和投资策略。

Snowflake

  1. 基于云的数据湖集成:利用该插件将来自各种来源的实时指标流式传输到 Snowflake 中,从而可以创建集中式数据湖。 这种集成支持云数据上的复杂分析和机器学习工作流程。

  2. 动态商业智能仪表板:利用该插件从传入的指标自动生成表,并将它们馈送到 BI 工具中。 这使企业能够创建动态仪表板,以可视化性能趋势和运营见解,而无需手动架构管理。

  3. 可扩展的物联网分析:部署该插件以捕获来自物联网设备的高频数据到 Snowflake 中。 此用例有助于传感器数据的聚合和分析,从而实现大规模的预测性维护和实时监控。

  4. 用于合规性的历史趋势分析:使用该插件在 Snowflake 中记录和存档详细的指标数据,然后可以查询这些数据以进行长期趋势分析和合规性报告。 此设置确保组织可以维护强大的审计跟踪并在需要时执行取证分析。

反馈

感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。

强大的性能,无限的扩展

收集、组织和处理海量高速数据。 当您将任何数据视为时序数据时,它都更有价值。 使用 InfluxDB,第一时序平台,旨在与 Telegraf 一起扩展。

查看入门方法

相关集成

HTTP 和 InfluxDB 集成

HTTP 插件从一个或多个 HTTP(S) 端点收集指标。 它支持各种身份验证方法和数据格式的配置选项。

查看集成

Kafka 和 InfluxDB 集成

此插件从 Kafka 读取消息,并允许根据这些消息创建指标。 它支持各种配置,包括不同的 Kafka 设置和消息处理选项。

查看集成

Kinesis 和 InfluxDB 集成

Kinesis 插件允许从 AWS Kinesis 流中读取指标。 它支持多种输入数据格式,并提供使用 DynamoDB 进行可靠消息处理的检查点功能。

查看集成