目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会变得更有价值。借助 InfluxDB,这个排名第一的时间序列平台,它旨在与 Telegraf 一起扩展。
查看入门方法
输入和输出集成概述
Telegraf 的 Hashicorp Vault 插件允许从 Hashicorp Vault 服务收集指标,从而促进监控和操作洞察。
InfluxDB 插件将指标写入 InfluxDB HTTP 服务,从而可以高效地存储和检索时间序列数据。
集成详情
Hashicorp Vault
Hashicorp Vault 插件旨在从集群内运行的 Vault 代理收集指标。它使 Telegraf(一种用于收集和报告指标的代理)能够与 Vault 服务接口,通常监听本地地址,例如 http://127.0.0.1:8200
。此插件需要有效的令牌进行授权,以确保安全访问 Vault API。用户必须直接配置令牌或提供令牌文件路径,从而增强身份验证方法的灵活性。超时和可选 TLS 设置的正确配置进一步关系到指标收集过程的安全性和响应性。由于 Vault 是管理密钥和保护敏感数据的关键工具,因此通过此插件监控其性能和健康状况对于维护操作安全性和效率至关重要。
InfluxDB
InfluxDB Telegraf 插件用于将指标发送到 InfluxDB HTTP API,从而促进以结构化方式存储和查询时间序列数据。此插件与 InfluxDB 无缝集成,提供诸如基于令牌的身份验证和对多个 InfluxDB 集群节点的支持等基本功能,从而确保可靠且可扩展的数据摄取。通过其可配置性,用户可以指定诸如组织、目标存储桶和 HTTP 特定设置之类的选项,从而灵活地定制数据的发送和存储方式。该插件还支持敏感数据的密钥管理,从而增强生产环境中的安全性。此插件在现代可观测性堆栈中特别有用,在这些堆栈中,实时分析和时间序列数据存储至关重要。
配置
Hashicorp Vault
[[inputs.vault]]
## URL for the Vault agent
# url = "http://127.0.0.1:8200"
## Use Vault token for authorization.
## Vault token configuration is mandatory.
## If both are empty or both are set, an error is thrown.
# token_file = "/path/to/auth/token"
## OR
token = "s.CDDrgg5zPv5ssI0Z2P4qxJj2"
## 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
InfluxDB
[[outputs.influxdb]]
## The full HTTP or UDP URL for your InfluxDB instance.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
# urls = ["http://127.0.0.1:8086"]
## Local address to bind when connecting to the server
## If empty or not set, the local address is automatically chosen.
# local_address = ""
## The target database for metrics; will be created as needed.
## For UDP url endpoint database needs to be configured on server side.
# database = "telegraf"
## The value of this tag will be used to determine the database. If this
## tag is not set the 'database' option is used as the default.
# database_tag = ""
## If true, the 'database_tag' will not be included in the written metric.
# exclude_database_tag = false
## If true, no CREATE DATABASE queries will be sent. Set to true when using
## Telegraf with a user without permissions to create databases or when the
## database already exists.
# skip_database_creation = false
## Name of existing retention policy to write to. Empty string writes to
## the default retention policy. Only takes effect when using HTTP.
# retention_policy = ""
## The value of this tag will be used to determine the retention policy. If this
## tag is not set the 'retention_policy' option is used as the default.
# retention_policy_tag = ""
## If true, the 'retention_policy_tag' will not be included in the written metric.
# exclude_retention_policy_tag = false
## Write consistency (clusters only), can be: "any", "one", "quorum", "all".
## Only takes effect when using HTTP.
# write_consistency = "any"
## Timeout for HTTP messages.
# timeout = "5s"
## HTTP Basic Auth
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
## HTTP User-Agent
# user_agent = "telegraf"
## UDP payload size is the maximum packet size to send.
# udp_payload = "512B"
## Optional TLS Config for use on HTTP connections.
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## HTTP Proxy override, if unset values the standard proxy environment
## variables are consulted to determine which proxy, if any, should be used.
# http_proxy = "http://corporate.proxy:3128"
## Additional HTTP headers
# http_headers = {"X-Special-Header" = "Special-Value"}
## HTTP Content-Encoding for write request body, can be set to "gzip" to
## compress body or "identity" to apply no encoding.
# content_encoding = "gzip"
## When true, Telegraf will output unsigned integers as unsigned values,
## i.e.: "42u". You will need a version of InfluxDB supporting unsigned
## integer values. Enabling this option will result in field type errors if
## existing data has been written.
# influx_uint_support = false
## When true, Telegraf will omit the timestamp on data to allow InfluxDB
## to set the timestamp of the data during ingestion. This is generally NOT
## what you want as it can lead to data points captured at different times
## getting omitted due to similar data.
# influx_omit_timestamp = false
输入和输出集成示例
Hashicorp Vault
-
集中式密钥管理监控:利用 Vault 插件监控分布式系统中的多个 Vault 实例,从而实现密钥访问模式和系统健康状况的统一视图。此设置可以帮助 DevOps 团队快速识别密钥访问中的任何异常,从而提供对不同环境中的安全态势的基本洞察。
-
审计日志集成:配置此插件以将监控指标馈送到审计日志记录系统,使组织能够全面了解其 Vault 交互。通过将审计日志与指标相关联,团队可以更有效地调查问题、优化性能并确保符合安全策略。
-
部署期间的性能基准测试:在与 Vault 交互的应用程序部署期间,使用该插件监控这些部署对 Vault 性能的影响。这使工程团队能够了解更改如何影响密钥管理工作流程,并主动解决性能瓶颈,从而确保平稳的部署过程。
-
超出阈值的警报:将此插件与警报机制集成,以便在指标超出预定义阈值时通知管理员。这种主动监控可以帮助团队快速响应潜在问题,通过允许他们在任何严重事件发生之前采取行动来维护系统可靠性和正常运行时间。
InfluxDB
-
实时系统监控:利用 InfluxDB 插件捕获和存储来自各种系统组件(例如 CPU 使用率、内存消耗和磁盘 I/O)的指标。通过将这些指标推送到 InfluxDB,您可以创建一个实时仪表板,以可视化实时系统性能。此设置不仅有助于识别性能瓶颈,还有助于通过分析长期趋势来进行主动容量规划。
-
Web 应用程序的性能跟踪:自动收集与 Web 应用程序性能相关的指标(例如请求持续时间、错误率和用户交互),并将它们推送到 InfluxDB。通过在监控堆栈中使用此插件,您可以使用存储的指标生成报告和分析,以帮助了解用户行为和应用程序效率,从而指导开发和优化工作。
-
物联网数据聚合:利用 InfluxDB Telegraf 插件从各种物联网设备收集传感器数据,并将其存储在集中的 InfluxDB 实例中。此用例使您能够分析环境或机器数据随时间变化的趋势和模式,从而促进更明智的决策和预测性维护策略。通过将物联网数据集成到 InfluxDB 中,组织可以利用历史数据分析的力量来推动创新和运营效率。
-
分析历史指标以进行预测:设置 InfluxDB 插件以将历史指标数据发送到 InfluxDB,并使用它来驱动预测模型。通过分析过去的性能指标,您可以创建预测未来趋势和需求的预测模型。此应用程序对于商业智能目的特别有用,可帮助组织根据历史使用模式为资源需求的波动做好准备。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会变得更有价值。借助 InfluxDB,这个排名第一的时间序列平台,它旨在与 Telegraf 一起扩展。
查看入门方法