Kubernetes 和 AWS Timestream 集成

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

info

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

50 亿+

Telegraf 下载量

#1

时间序列数据库
来源:DB Engines

10 亿+

InfluxDB 下载量

2,800+

贡献者

目录

强大的性能,无限的扩展能力

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

查看入门方法

输入和输出集成概述

此插件通过与 Kubelet API 通信来捕获 Kubernetes Pod 和容器的指标。

AWS Timestream Telegraf 插件使用户能够将指标直接发送到 Amazon 的 Timestream 服务,该服务专为时间序列数据管理而设计。此插件为身份验证、数据组织和保留设置提供了多种配置选项。

集成详情

Kubernetes

Kubernetes 输入插件与 Kubelet API 接口,以收集在单个主机上运行的 Pod 和容器的指标,理想情况下,作为 Kubernetes 安装中守护程序集的一部分。通过在集群内的每个节点上运行,它可以从本地运行的 kubelet 收集指标,确保数据反映环境的实时状态。作为一个快速发展的项目,Kubernetes 经常更新,此插件遵循主要云提供商支持的版本,在有限的时间跨度内保持跨多个版本的兼容性。需要特别注意的是潜在的高基数字符串,这可能会给数据库带来负担;因此,建议用户实施过滤技术和保留策略以有效管理此负载。配置选项提供了插件行为的灵活定制,以无缝集成到不同的设置中,从而增强其在监控 Kubernetes 环境中的实用性。

AWS Timestream

此插件旨在高效地将指标写入 Amazon 的 Timestream 服务,这是一种针对物联网和运营应用程序优化的时间序列数据库。借助此插件,Telegraf 可以发送从各种来源收集的数据,并支持身份验证、数据组织和保留管理的灵活配置。它利用凭证链进行身份验证,允许各种方法,例如 Web 身份、承担角色和共享配置文件。用户可以定义指标在 Timestream 中的组织方式——是使用单表还是多表,以及控制磁存储和内存存储的保留期等方面。一个关键功能是它能够处理多度量记录,从而实现高效的数据摄取并有助于减少多次写入的开销。在错误处理方面,该插件包含用于解决数据写入期间与 AWS 错误相关的常见问题的机制,例如用于节流的重试逻辑以及根据需要创建表的能力。

配置

Kubernetes

[[inputs.kubernetes]]
  ## URL for the kubelet, if empty read metrics from all nodes in the cluster
  url = "http://127.0.0.1:10255"

  ## Use bearer token for authorization. ('bearer_token' takes priority)
  ## If both of these are empty, we'll use the default serviceaccount:
  ## at: /var/run/secrets/kubernetes.io/serviceaccount/token
  ##
  ## To re-read the token at each interval, please use a file with the
  ## bearer_token option. If given a string, Telegraf will always use that
  ## token.
  # bearer_token = "/var/run/secrets/kubernetes.io/serviceaccount/token"
  ## OR
  # bearer_token_string = "abc_123"

  ## Kubernetes Node Metric Name
  ## The default Kubernetes node metric name (i.e. kubernetes_node) is the same
  ## for the kubernetes and kube_inventory plugins. To avoid conflicts, set this
  ## option to a different value.
  # node_metric_name = "kubernetes_node"

  ## Pod labels to be added as tags.  An empty array for both include and
  ## exclude will include all labels.
  # label_include = []
  # label_exclude = ["*"]

  ## Set response_timeout (default 5 seconds)
  # response_timeout = "5s"

  ## Optional TLS Config
  # tls_ca = /path/to/cafile
  # tls_cert = /path/to/certfile
  # tls_key = /path/to/keyfile
  ## Use TLS but skip chain & host verification
  # insecure_skip_verify = false

AWS Timestream

[[outputs.timestream]]
  ## Amazon Region
  region = "us-east-1"

  ## 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 = ""

  ## Timestream database where the metrics will be inserted.
  ## The database must exist prior to starting Telegraf.
  database_name = "yourDatabaseNameHere"

  ## Specifies if the plugin should describe the Timestream database upon starting
  ## to validate if it has access necessary permissions, connection, etc., as a safety check.
  ## If the describe operation fails, the plugin will not start
  ## and therefore the Telegraf agent will not start.
  describe_database_on_start = false

  ## Specifies how the data is organized in Timestream.
  ## Valid values are: single-table, multi-table.
  ## When mapping_mode is set to single-table, all of the data is stored in a single table.
  ## When mapping_mode is set to multi-table, the data is organized and stored in multiple tables.
  ## The default is multi-table.
  mapping_mode = "multi-table"

  ## Specifies if the plugin should create the table, if the table does not exist.
  create_table_if_not_exists = true

  ## Specifies the Timestream table magnetic store retention period in days.
  ## Check Timestream documentation for more details.
  ## NOTE: This property is valid when create_table_if_not_exists = true.
  create_table_magnetic_store_retention_period_in_days = 365

  ## Specifies the Timestream table memory store retention period in hours.
  ## Check Timestream documentation for more details.
  ## NOTE: This property is valid when create_table_if_not_exists = true.
  create_table_memory_store_retention_period_in_hours = 24

  ## Specifies how the data is written into Timestream.
  ## Valid values are: true, false
  ## When use_multi_measure_records is set to true, all of the tags and fields are stored
  ## as a single row in a Timestream table.
  ## When use_multi_measure_record is set to false, Timestream stores each field in a
  ## separate table row, thereby storing the tags multiple times (once for each field).
  ## The recommended setting is true.
  ## The default is false.
  use_multi_measure_records = "false"

  ## Specifies the measure_name to use when sending multi-measure records.
  ## NOTE: This property is valid when use_multi_measure_records=true and mapping_mode=multi-table
  measure_name_for_multi_measure_records = "telegraf_measure"

  ## Specifies the name of the table to write data into
  ## NOTE: This property is valid when mapping_mode=single-table.
  # single_table_name = ""

  ## Specifies the name of dimension when all of the data is being stored in a single table
  ## and the measurement name is transformed into the dimension value
  ## (see Mapping data from Influx to Timestream for details)
  ## NOTE: This property is valid when mapping_mode=single-table.
  # single_table_dimension_name_for_telegraf_measurement_name = "namespace"

  ## Only valid and optional if create_table_if_not_exists = true
  ## Specifies the Timestream table tags.
  ## Check Timestream documentation for more details
  # create_table_tags = { "foo" = "bar", "environment" = "dev"}

  ## Specify the maximum number of parallel go routines to ingest/write data
  ## If not specified, defaulted to 1 go routines
  max_write_go_routines = 25

  ## Please see README.md to know how line protocol data is mapped to Timestream
  ##

输入和输出集成示例

Kubernetes

  1. 动态资源分配监控:通过利用 Kubernetes 插件,团队可以为各种 Pod 和容器的资源使用模式设置警报。这种主动监控方法能够自动扩展资源以响应特定阈值,从而帮助优化性能,同时最大限度地降低高峰使用期间的成本。

  2. 多租户资源隔离分析:使用 Kubernetes 的组织可以利用此插件来跟踪每个命名空间的资源消耗。在多租户场景中,了解不同团队之间的资源分配和使用情况对于确保公平访问和性能保证至关重要,从而带来更好的资源管理策略。

  3. 实时健康状况仪表板:将 Kubernetes 插件捕获的数据集成到 Grafana 等可视化工具中,以创建实时仪表板。这些仪表板提供了对 Kubernetes 环境整体健康状况和性能的深入了解,使团队能够快速识别和纠正跨集群、Pod 和容器的问题。

  4. 自动化事件响应工作流程:通过将 Kubernetes 插件与警报管理系统相结合,团队可以基于实时指标自动化事件响应程序。如果 Pod 的资源使用量超过预定义限制,则自动化工作流程可以触发补救措施,例如重新启动 Pod 或重新分配资源,所有这些都有助于提高系统弹性。

AWS Timestream

  1. 物联网数据指标:使用 Timestream 插件将来自物联网设备的实时指标发送到 Timestream,从而可以快速分析和可视化传感器数据。通过将设备读数组织成时间序列格式,用户可以跟踪趋势、识别异常并根据设备性能简化运营决策。

  2. 应用程序性能监控:将 Timestream 与应用程序监控工具结合使用,以随时间推移发送有关服务性能的指标。这种集成使工程师能够执行应用程序性能的历史分析,将其与业务指标相关联,并根据随时间推移查看的使用模式优化资源分配。

  3. 自动化数据归档:配置 Timestream 插件以将数据写入 Timestream,同时管理保留期。此设置可以自动化归档策略,确保根据预定义标准保留旧数据。这对于合规性和历史分析尤其有用,使企业能够在最少的人工干预下维护其数据生命周期。

  4. 多应用程序指标聚合:利用 Timestream 插件将来自多个应用程序的指标聚合到 Timestream 中。通过创建性能指标的统一数据库,组织可以获得跨各种服务的整体洞察力,提高对系统范围性能的可见性并促进跨应用程序故障排除。

反馈

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

强大的性能,无限的扩展能力

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

查看入门方法

相关集成

HTTP 和 InfluxDB 集成

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

查看集成

Kafka 和 InfluxDB 集成

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

查看集成

Kinesis 和 InfluxDB 集成

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

查看集成