目录
输入和输出集成概述
Zookeeper Telegraf 插件收集并报告来自 Zookeeper 服务器的指标,从而促进监控和性能分析。它利用 ‘mntr’ 命令的输出,收集对维护 Zookeeper 运行状况至关重要的基本统计信息。
AWS Timestream Telegraf 插件使用户能够将指标直接发送到 Amazon 的 Timestream 服务,该服务专为时序数据管理而设计。此插件提供各种配置选项,用于身份验证、数据组织和保留设置。
集成详情
Apache Zookeeper
Telegraf 的 Zookeeper 插件旨在通过执行 ‘mntr’ 命令,从 Zookeeper 服务器收集关键统计信息。此插件充当监控工具,捕获与 Zookeeper 性能相关的重要指标,包括连接详情、延迟和各种操作统计信息,从而有助于评估 Zookeeper 部署的运行状况和效率。与在启用 Prometheus 指标提供程序时推荐使用的 Prometheus 输入插件相比,Zookeeper 插件访问 ‘mntr’ 命令的原始输出,使其专为不采用 Prometheus 进行指标报告的配置而定制。这种独特的方法允许管理员直接从 Zookeeper 收集 Java Properties 格式的指标,确保全面了解 Zookeeper 的运行状态,并能够及时响应性能异常。它尤其擅长于 Zookeeper 作为集中式服务运行的环境,用于维护分布式系统的配置信息和名称,从而提供对故障排除和容量规划至关重要的宝贵见解。
AWS Timestream
此插件旨在高效地将指标写入 Amazon 的 Timestream 服务,这是一个针对物联网和运营应用优化的时序数据库。借助此插件,Telegraf 可以发送从各种来源收集的数据,并支持灵活的配置,用于身份验证、数据组织和保留管理。它利用凭证链进行身份验证,允许各种方法,如 Web 身份、承担角色和共享配置文件。用户可以定义指标在 Timestream 中的组织方式——是使用单个表还是多个表,以及控制各个方面,例如磁存储和内存存储的保留期限。一个关键特性是它能够处理多指标记录,从而实现高效的数据摄取,并有助于减少多次写入的开销。在错误处理方面,该插件包含解决与数据写入期间 AWS 错误相关的常见问题的机制,例如用于节流的重试逻辑和按需创建表的能力。
配置
Apache Zookeeper
[[inputs.zookeeper]]
## An array of address to gather stats about. Specify an ip or hostname
## with port. ie localhost:2181, 10.0.0.1:2181, etc.
## If no servers are specified, then localhost is used as the host.
## If no port is specified, 2181 is used
servers = [":2181"]
## Timeout for metric collections from all servers. Minimum timeout is "1s".
# timeout = "5s"
## Float Parsing - the initial implementation forced any value unable to be
## parsed as an int to be a string. Setting this to "float" will attempt to
## parse float values as floats and not strings. This would break existing
## metrics and may cause issues if a value switches between a float and int.
# parse_floats = "string"
## Optional TLS Config
# enable_tls = false
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## If false, skip chain & host verification
# insecure_skip_verify = true
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
##
输入和输出集成示例
Apache Zookeeper
-
集群健康监控:集成 Zookeeper 插件,以监控依赖 Zookeeper 进行配置管理和服务发现的分布式应用程序的运行状况和性能。通过跟踪会话计数、延迟和数据大小等指标,DevOps 团队可以在潜在问题升级之前识别它们,从而确保跨应用程序的高可用性和可靠性。
-
性能基准测试:利用此插件在不同的工作负载场景中对 Zookeeper 性能进行基准测试。这不仅有助于了解 Zookeeper 在负载下的行为方式,还有助于调整配置,以优化吞吐量并减少高峰操作期间的延迟。
-
异常警报:将此插件与警报工具结合使用,创建一个主动监控系统,如果特定的 Zookeeper 指标超过阈值限制(例如打开的文件描述符计数或高延迟值),该系统会通知工程师。这使团队能够及时响应可能影响服务可靠性的问题。
-
历史数据分析:将 Zookeeper 插件收集的指标存储在时序数据库中,以分析历史性能趋势。这使团队能够评估随时间推移的变化的影响,评估扩展操作的有效性,并规划未来的容量需求。
AWS Timestream
-
物联网数据指标:使用 Timestream 插件将来自物联网设备的实时指标发送到 Timestream,从而可以快速分析和可视化传感器数据。通过将设备读数组织成时序格式,用户可以跟踪趋势、识别异常,并根据设备性能简化运营决策。
-
应用程序性能监控:将 Timestream 与应用程序监控工具一起使用,以发送有关服务性能随时间变化的指标。这种集成使工程师能够执行应用程序性能的历史分析,将其与业务指标相关联,并根据随时间推移的使用模式优化资源分配。
-
自动化数据归档:配置 Timestream 插件以将数据写入 Timestream,同时管理保留期限。此设置可以自动化归档策略,确保根据预定义的标准保留较旧的数据。这对于合规性和历史分析尤其有用,使企业能够以最少的人工干预来维护其数据生命周期。
-
多应用程序指标聚合:利用 Timestream 插件将来自多个应用程序的指标聚合到 Timestream 中。通过创建性能指标的统一数据库,组织可以获得跨各种服务的整体见解,从而提高系统范围性能的可见性,并促进跨应用程序的故障排除。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。