目录
强大的性能,无限的扩展
收集、组织和处理海量高速数据。 当您将任何数据视为时间序列数据时,它都更有价值。 借助 InfluxDB,排名第一的时间序列平台,专为与 Telegraf 协同扩展而构建。
查看入门方法
输入和输出集成概览
Syslog 插件支持使用标准网络协议从各种来源收集 syslog 消息。 此功能对于需要有效监控和记录系统的环境至关重要。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace 进行监控和分析。 这种集成增强了系统和应用程序的可观察性,为性能和运行状况提供了有价值的见解。
集成详情
Syslog
Telegraf 的 Syslog 插件捕获通过各种协议(如 TCP、UDP 和 TLS)传输的 syslog 消息。 它支持 RFC 5424(较新的 syslog 协议)和较旧的 RFC 3164(BSD syslog 协议)。 此插件作为服务输入运行,有效地启动一个服务来侦听传入的 syslog 消息。 与传统插件不同,服务输入可能无法与标准间隔设置或 CLI 选项(如 --once
)一起使用。 它包括用于设置网络配置、套接字权限、消息处理和连接处理的选项。 此外,与 Rsyslog 的集成允许转发日志消息,使其成为实时收集和中继系统日志的强大工具,从而无缝集成到监控和日志记录系统中。
Dynatrace
Telegraf 的 Dynatrace 插件有助于通过 Dynatrace Metrics API V2 将指标传输到 Dynatrace 平台。 此插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者自动执行身份验证;或者它可以以独立配置运行,这需要手动指定 URL 和 API 令牌,以用于没有 OneAgent 的环境。 除非显式配置为使用可用配置选项将某些指标视为增量计数器,否则插件主要将指标报告为计量器。 此功能使户能够自定义发送到 Dynatrace 的指标的行为,从而利用该平台的强大功能进行全面的性能监控和可观察性。 用户务必确保符合 Dynatrace 和 Telegraf 的版本要求,从而优化与 Dynatrace 生态系统集成时的兼容性和性能。
配置
Syslog
[[inputs.syslog]]
## Protocol, address and port to host the syslog receiver.
## If no host is specified, then localhost is used.
## If no port is specified, 6514 is used (RFC5425#section-4.1).
## ex: server = "tcp://localhost:6514"
## server = "udp://:6514"
## server = "unix:///var/run/telegraf-syslog.sock"
## When using tcp, consider using 'tcp4' or 'tcp6' to force the usage of IPv4
## or IPV6 respectively. There are cases, where when not specified, a system
## may force an IPv4 mapped IPv6 address.
server = "tcp://127.0.0.1:6514"
## Permission for unix sockets (only available on unix sockets)
## This setting may not be respected by some platforms. To safely restrict
## permissions it is recommended to place the socket into a previously
## created directory with the desired permissions.
## ex: socket_mode = "777"
# socket_mode = ""
## Maximum number of concurrent connections (only available on stream sockets like TCP)
## Zero means unlimited.
# max_connections = 0
## Read timeout (only available on stream sockets like TCP)
## Zero means unlimited.
# read_timeout = "0s"
## Optional TLS configuration (only available on stream sockets like TCP)
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Enables client authentication if set.
# tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]
## Maximum socket buffer size (in bytes when no unit specified)
## For stream sockets, once the buffer fills up, the sender will start
## backing up. For datagram sockets, once the buffer fills up, metrics will
## start dropping. Defaults to the OS default.
# read_buffer_size = "64KiB"
## Period between keep alive probes (only applies to TCP sockets)
## Zero disables keep alive probes. Defaults to the OS configuration.
# keep_alive_period = "5m"
## Content encoding for message payloads
## Can be set to "gzip" for compressed payloads or "identity" for no encoding.
# content_encoding = "identity"
## Maximum size of decoded packet (in bytes when no unit specified)
# max_decompression_size = "500MB"
## Framing technique used for messages transport
## Available settings are:
## octet-counting -- see RFC5425#section-4.3.1 and RFC6587#section-3.4.1
## non-transparent -- see RFC6587#section-3.4.2
# framing = "octet-counting"
## The trailer to be expected in case of non-transparent framing (default = "LF").
## Must be one of "LF", or "NUL".
# trailer = "LF"
## Whether to parse in best effort mode or not (default = false).
## By default best effort parsing is off.
# best_effort = false
## The RFC standard to use for message parsing
## By default RFC5424 is used. RFC3164 only supports UDP transport (no streaming support)
## Must be one of "RFC5424", or "RFC3164".
# syslog_standard = "RFC5424"
## Character to prepend to SD-PARAMs (default = "_").
## A syslog message can contain multiple parameters and multiple identifiers within structured data section.
## Eg., [id1 name1="val1" name2="val2"][id2 name1="val1" nameA="valA"]
## For each combination a field is created.
## Its name is created concatenating identifier, sdparam_separator, and parameter name.
# sdparam_separator = "_"
Dynatrace
[[outputs.dynatrace]]
## For usage with the Dynatrace OneAgent you can omit any configuration,
## the only requirement is that the OneAgent is running on the same host.
## Only setup environment url and token if you want to monitor a Host without the OneAgent present.
##
## Your Dynatrace environment URL.
## For Dynatrace OneAgent you can leave this empty or set it to "http://127.0.0.1:14499/metrics/ingest" (default)
## For Dynatrace SaaS environments the URL scheme is "https://{your-environment-id}.live.dynatrace.com/api/v2/metrics/ingest"
## For Dynatrace Managed environments the URL scheme is "https://{your-domain}/e/{your-environment-id}/api/v2/metrics/ingest"
url = ""
## Your Dynatrace API token.
## Create an API token within your Dynatrace environment, by navigating to Settings > Integration > Dynatrace API
## The API token needs data ingest scope permission. When using OneAgent, no API token is required.
api_token = ""
## Optional prefix for metric names (e.g.: "telegraf")
prefix = "telegraf"
## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
## Optional flag for ignoring tls certificate check
# insecure_skip_verify = false
## Connection timeout, defaults to "5s" if not set.
timeout = "5s"
## If you want metrics to be treated and reported as delta counters, add the metric names here
additional_counters = [ ]
## In addition or as an alternative to additional_counters, if you want metrics to be treated and
## reported as delta counters using regular expression pattern matching
additional_counters_patterns = [ ]
## NOTE: Due to the way TOML is parsed, tables must be at the END of the
## plugin definition, otherwise additional config options are read as part of the
## table
## Optional dimensions to be added to every metric
# [outputs.dynatrace.default_dimensions]
# default_key = "default value"
输入和输出集成示例
Syslog
-
集中式日志管理:使用 Syslog 插件将来自多台服务器的日志消息聚合到中央日志记录系统中。 通过从不同来源收集 syslog 数据,此设置可以帮助监控整体系统运行状况、有效排除问题和维护审计跟踪。
-
实时警报:将 Syslog 插件与警报工具集成,以在检测到特定日志模式或错误时触发实时通知。 例如,如果日志中出现关键系统错误,则可以向运营团队发送警报,从而最大限度地减少停机时间并执行主动维护。
-
安全监控:利用 Syslog 插件进行安全监控,捕获来自防火墙、入侵检测系统和其他安全设备的日志。 这种日志记录功能增强了安全可见性,并通过分析捕获的 syslog 数据来帮助调查潜在的恶意活动。
-
应用程序性能跟踪:利用 Syslog 插件通过从各种应用程序收集日志来监控应用程序性能。 这种集成有助于分析应用程序的行为和性能趋势,从而帮助优化应用程序流程并确保更顺畅的运行。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件来监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace。 这种集成提供了资源利用率、应用程序性能和系统运行状况的整体视图,从而能够主动响应各种云环境中的性能问题。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,实现自定义应用程序特定的指标。 通过利用其他计数器和维度选项,开发团队可以获得与应用程序运营需求精确对齐的见解,从而进行有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。 通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。
-
基于指标变化的自动警报:将 Dynatrace 输出插件与警报机制集成,该机制在特定指标超出定义的阈值时触发通知。 这种情况涉及配置其他计数器来监控关键应用程序性能指标,从而能够快速采取补救措施来维持服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。
强大的性能,无限的扩展
收集、组织和处理海量高速数据。 当您将任何数据视为时间序列数据时,它都更有价值。 借助 InfluxDB,排名第一的时间序列平台,专为与 Telegraf 协同扩展而构建。
查看入门方法