目录
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会变得更有价值。InfluxDB 是排名第一的、旨在与 Telegraf 协同扩展的时序平台。
查看入门方法
输入和输出集成概述
DNS 插件使用户能够监控和收集 DNS 查询时间的统计信息,从而促进 DNS 解析的性能分析。
OpenSearch 输出插件允许用户使用 HTTP 将指标直接发送到 OpenSearch 实例,从而促进 OpenSearch 生态系统内有效的数据管理和分析。
集成详情
DNS
此插件以毫秒为单位收集 DNS 查询时间,利用类似于 Dig 命令的 DNS 查询功能。它提供了一种通过测量来自指定 DNS 服务器的响应时间来监控和分析 DNS 性能的方法,使网络管理员和工程师能够确保最佳的 DNS 解析时间。该插件可以配置为以特定服务器为目标,并自定义查询的记录类型,包括各种 DNS 功能,例如将域名解析为 IP 地址,或根据需要从特定记录中检索详细信息,同时清楚地报告每次查询的成功或失败,以及相关的元数据。
OpenSearch
OpenSearch Telegraf 插件通过 HTTP 与 OpenSearch 数据库集成,从而可以简化指标的收集和存储。作为专为 2.x 及更高版本的 OpenSearch 版本设计的强大工具,该插件在通过原始 Elasticsearch 插件提供与 1.x 的兼容性的同时,提供了强大的功能。此插件有助于在 OpenSearch 中创建和管理索引,自动管理模板并确保数据结构化以实现高效分析。该插件支持各种配置选项,例如索引名称、身份验证、运行状况检查和值处理,使其可以根据不同的操作要求进行定制。其功能使其对于希望利用 OpenSearch 的强大功能进行指标存储和查询的组织至关重要。
配置
DNS
[[inputs.dns_query]]
servers = ["8.8.8.8"]
# network = "udp"
# domains = ["."]
# record_type = "A"
# port = 53
# timeout = "2s"
# include_fields = []
OpenSearch
[[outputs.opensearch]]
## URLs
## The full HTTP endpoint URL for your OpenSearch instance. Multiple URLs can
## be specified as part of the same cluster, but only one URLs is used to
## write during each interval.
urls = ["http://node1.os.example.com:9200"]
## Index Name
## Target index name for metrics (OpenSearch will create if it not exists).
## This is a Golang template (see https://pkg.go.dev/text/template)
## You can also specify
## metric name (`{{.Name}}`), tag value (`{{.Tag "tag_name"}}`), field value (`{{.Field "field_name"}}`)
## If the tag does not exist, the default tag value will be empty string "".
## the timestamp (`{{.Time.Format "xxxxxxxxx"}}`).
## For example: "telegraf-{{.Time.Format \"2006-01-02\"}}-{{.Tag \"host\"}}" would set it to telegraf-2023-07-27-HostName
index_name = ""
## Timeout
## OpenSearch client timeout
# timeout = "5s"
## Sniffer
## Set to true to ask OpenSearch a list of all cluster nodes,
## thus it is not necessary to list all nodes in the urls config option
# enable_sniffer = false
## GZIP Compression
## Set to true to enable gzip compression
# enable_gzip = false
## Health Check Interval
## Set the interval to check if the OpenSearch nodes are available
## Setting to "0s" will disable the health check (not recommended in production)
# health_check_interval = "10s"
## Set the timeout for periodic health checks.
# health_check_timeout = "1s"
## HTTP basic authentication details.
# username = ""
# password = ""
## HTTP bearer token authentication details
# auth_bearer_token = ""
## Optional TLS Config
## Set to true/false to enforce TLS being enabled/disabled. If not set,
## enable TLS only if any of the other options are specified.
# tls_enable =
## Trusted root certificates for server
# tls_ca = "/path/to/cafile"
## Used for TLS client certificate authentication
# tls_cert = "/path/to/certfile"
## Used for TLS client certificate authentication
# tls_key = "/path/to/keyfile"
## Send the specified TLS server name via SNI
# tls_server_name = "kubernetes.example.com"
## Use TLS but skip chain & host verification
# insecure_skip_verify = false
## Template Config
## Manage templates
## Set to true if you want telegraf to manage its index template.
## If enabled it will create a recommended index template for telegraf indexes
# manage_template = true
## Template Name
## The template name used for telegraf indexes
# template_name = "telegraf"
## Overwrite Templates
## Set to true if you want telegraf to overwrite an existing template
# overwrite_template = false
## Document ID
## If set to true a unique ID hash will be sent as
## sha256(concat(timestamp,measurement,series-hash)) string. It will enable
## data resend and update metric points avoiding duplicated metrics with
## different id's
# force_document_id = false
## Value Handling
## Specifies the handling of NaN and Inf values.
## This option can have the following values:
## none -- do not modify field-values (default); will produce an error
## if NaNs or infs are encountered
## drop -- drop fields containing NaNs or infs
## replace -- replace with the value in "float_replacement_value" (default: 0.0)
## NaNs and inf will be replaced with the given number, -inf with the negative of that number
# float_handling = "none"
# float_replacement_value = 0.0
## Pipeline Config
## To use a ingest pipeline, set this to the name of the pipeline you want to use.
# use_pipeline = "my_pipeline"
## Pipeline Name
## Additionally, you can specify a tag name using the notation (`{{.Tag "tag_name"}}`)
## which will be used as the pipeline name (e.g. "{{.Tag \"os_pipeline\"}}").
## If the tag does not exist, the default pipeline will be used as the pipeline.
## If no default pipeline is set, no pipeline is used for the metric.
# default_pipeline = ""
输入和输出集成示例
DNS
-
监控多个服务器的 DNS 性能:通过部署 DNS 插件,用户可以通过在
servers
数组中指定不同的 DNS 服务器(例如 Google DNS 和 Cloudflare DNS)来同时监控它们的性能。此方案可以比较不同 DNS 提供商之间的响应时间和可靠性,从而帮助根据经验数据选择最佳选项。 -
分析高流量域名的查询时间:集成该插件以专门测量与组织运营相关的高流量域名(例如内部服务或面向客户的站点)的响应时间。通过关注这些域名的性能指标,组织可以主动解决延迟问题,确保服务可靠性并改善用户体验。
-
DNS 超时警报:将插件与警报系统结合使用,以便在 DNS 查询超过定义的超时阈值时通知管理员。此设置可以帮助主动排除网络问题或服务器配置错误,从而促进对潜在停机场景的快速响应。
-
收集历史数据以了解性能趋势:使用该插件收集较长时期内 DNS 查询时间的历史数据。此数据可用于分析 DNS 性能的趋势和模式,从而更好地进行容量规划,识别周期性问题,并证明基础设施升级或更改 DNS 架构的合理性。
OpenSearch
-
时间序列数据的动态索引:利用 OpenSearch Telegraf 插件为时间序列指标动态创建索引,确保数据以有利于基于时间的查询的有序方式存储。通过使用 Go 模板定义索引模式,用户可以利用该插件创建每日或每月索引,这可以大大简化数据管理和长期检索,从而提高分析性能。
-
多租户应用程序的集中日志记录:在多租户应用程序中实施 OpenSearch 插件,其中每个租户的日志都发送到单独的索引。这可以实现针对每个租户的定向分析和监控,同时保持数据隔离。通过利用索引名称模板化功能,用户可以自动创建特定于租户的索引,这不仅简化了流程,而且还增强了租户数据的安全性和可访问性。
-
与机器学习集成以进行异常检测:将 OpenSearch 插件与机器学习工具结合使用,以自动检测指标数据中的异常。通过将插件配置为将实时指标发送到 OpenSearch,用户可以在传入的数据流上应用机器学习模型,以识别异常值或异常模式,从而促进主动监控和快速补救措施。
-
使用 OpenSearch 增强监控仪表板:使用从 OpenSearch 收集的指标创建实时仪表板,以深入了解系统性能。通过将指标馈送到 OpenSearch,组织可以利用 OpenSearch Dashboards 可视化关键绩效指标,从而使运营团队能够快速评估运行状况和性能,并做出数据驱动的决策。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展能力
收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都会变得更有价值。InfluxDB 是排名第一的、旨在与 Telegraf 协同扩展的时序平台。
查看入门方法