AWS Data Firehose 和 MongoDB 集成

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

info

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

50 亿+

Telegraf 下载量

#1

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

10 亿+

InfluxDB 下载量

2,800+

贡献者

目录

强大的性能,无限的扩展

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

查看入门方法

输入和输出集成概述

此插件监听通过 HTTP 从 AWS Data Firehose 以支持的数据格式发送的指标,提供实时数据摄取功能。

MongoDB Telegraf 插件使用户能够将指标发送到 MongoDB 数据库,自动管理时间序列集合。

集成详情

AWS Data Firehose

AWS Data Firehose Telegraf 插件旨在通过 HTTP 从 AWS Data Firehose 接收指标。 此插件监听各种格式的传入数据,并根据官方 AWS 文档中概述的请求-响应模式对其进行处理。 与在固定间隔内运行的标准输入插件不同,此服务插件初始化一个保持活动状态的监听器,等待传入的指标。 这允许从 AWS Data Firehose 实时摄取数据,使其适用于需要立即进行数据处理的场景。 主要功能包括指定服务地址、路径以及支持 TLS 连接以实现安全数据传输的功能。 此外,该插件还适应可选的身份验证密钥和自定义标签,从而增强了其在涉及数据流和处理的各种用例中的灵活性。

MongoDB

此插件将指标发送到 MongoDB,并与其时间序列功能无缝集成,从而允许在时间序列集合尚不存在时自动创建为时间序列集合。 它需要 MongoDB 5.0 或更高版本才能使用时间序列集合功能,这对于有效存储和查询基于时间的数据至关重要。 此插件通过确保所有相关指标都正确存储和组织在 MongoDB 中来增强监控功能,从而为用户提供利用 MongoDB 强大的查询和聚合功能进行时间序列分析的能力。

配置

AWS Data Firehose

[[inputs.firehose]]
  ## Address and port to host HTTP listener on
  service_address = ":8080"

  ## Paths to listen to.
  # paths = ["/telegraf"]

  ## maximum duration before timing out read of the request
  # read_timeout = "5s"
  ## maximum duration before timing out write of the response
  # write_timeout = "5s"

  ## Set one or more allowed client CA certificate file names to
  ## enable mutually authenticated TLS connections
  # tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]

  ## Add service certificate and key
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"

  ## Minimal TLS version accepted by the server
  # tls_min_version = "TLS12"

  ## Optional access key to accept for authentication.
  ## AWS Data Firehose uses "x-amz-firehose-access-key" header to set the access key.
  ## If no access_key is provided (default), authentication is completely disabled and
  ## this plugin will accept all request ignoring the provided access-key in the request!
  # access_key = "foobar"

  ## Optional setting to add parameters as tags
  ## If the http header "x-amz-firehose-common-attributes" is not present on the
  ## request, no corresponding tag will be added. The header value should be a
  ## json and should follow the schema as describe in the official documentation:
  ## https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html#requestformat
  # parameter_tags = ["env"]

  ## Data format to consume.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
  # data_format = "influx"

MongoDB

[[outputs.mongodb]]
              # connection string examples for mongodb
              dsn = "mongodb://localhost:27017"
              # dsn = "mongodb://mongod1:27017,mongod2:27017,mongod3:27017/admin&replicaSet=myReplSet&w=1"

              # overrides serverSelectionTimeoutMS in dsn if set
              # timeout = "30s"

              # default authentication, optional
              # authentication = "NONE"

              # for SCRAM-SHA-256 authentication
              # authentication = "SCRAM"
              # username = "root"
              # password = "***"

              # for x509 certificate authentication
              # authentication = "X509"
              # tls_ca = "ca.pem"
              # tls_key = "client.pem"
              # # tls_key_pwd = "changeme" # required for encrypted tls_key
              # insecure_skip_verify = false

              # database to store measurements and time series collections
              # database = "telegraf"

              # granularity can be seconds, minutes, or hours.
              # configuring this value will be based on your input collection frequency.
              # see https://docs.mongodb.com/manual/core/timeseries-collections/#create-a-time-series-collection
              # granularity = "seconds"

              # optionally set a TTL to automatically expire documents from the measurement collections.
              # ttl = "360h"

输入和输出集成示例

AWS Data Firehose

  1. 实时数据分析:通过使用 AWS Data Firehose 插件,组织可以从各种来源(例如应用程序日志或物联网设备)实时流式传输数据到分析平台。 这使数据团队能够分析传入的数据,从而根据最新的指标实现快速洞察和运营调整。

  2. 分析访问模式以进行优化:通过收集有关客户端如何通过 AWS Data Firehose 与应用程序交互的数据,企业可以获得有关用户行为的宝贵见解。 这可以推动内容个性化策略或优化服务器架构,以根据流量模式获得更好的性能。

  3. 自动化警报机制:通过此插件将 AWS Data Firehose 与警报系统集成,使团队能够根据收集的特定指标设置自动化警报。 例如,如果输入数据中达到特定阈值,则警报可以触发运营团队调查潜在问题,以防它们升级。

MongoDB

  1. 动态日志记录到 MongoDB 以用于物联网设备:使用此插件实时收集和存储来自大量物联网设备的指标。 通过将设备日志直接发送到 MongoDB,您可以创建一个集中式数据库,该数据库允许轻松访问和查询运行状况指标和性能数据,从而可以根据历史趋势进行主动维护和故障排除。

  2. Web 流量的时间序列分析:使用 MongoDB Telegraf 插件收集和分析一段时间内的 Web 流量指标。 此应用程序可以帮助您了解高峰使用时间、用户交互和行为模式,从而指导营销策略和基础设施扩展决策,以改善用户体验。

  3. 自动化监控和警报系统:将 MongoDB 插件集成到跟踪应用程序性能指标的自动化监控系统中。 通过时间序列集合,您可以根据特定阈值设置警报,从而使您的团队能够在潜在问题影响用户之前做出响应。 这种主动管理可以提高服务可靠性和整体性能。

  4. 指标存储中的数据保留和 TTL 管理:利用 MongoDB 集合中文档的 TTL 功能来自动过期过时的指标。 这对于仅最近的性能数据相关的环境尤其有用,可防止 MongoDB 数据库因旧指标而变得混乱,并确保高效的数据管理。

反馈

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

强大的性能,无限的扩展

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

查看入门方法

相关集成

HTTP 和 InfluxDB 集成

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

查看集成

Kafka 和 InfluxDB 集成

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

查看集成

Kinesis 和 InfluxDB 集成

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

查看集成