目录
输入和输出集成概述
OPC UA 插件提供了一个接口,用于从 OPC UA 服务器设备检索数据,从而促进有效的数据收集和监控。
Dynatrace 插件允许用户将 Telegraf 收集的指标直接发送到 Dynatrace 进行监控和分析。此集成增强了系统和应用程序的可观测性,为性能和运行状况提供了宝贵的见解。
集成详情
OPC UA
OPC UA 插件从使用 OPC UA 协议通信的设备检索数据,使您能够收集和监控来自 OPC UA 服务器的数据。
Dynatrace
Telegraf 的 Dynatrace 插件通过 Dynatrace Metrics API V2 促进指标传输到 Dynatrace 平台。此插件可以在两种模式下运行:它可以与 Dynatrace OneAgent 一起运行,后者自动执行身份验证;或者它可以在独立配置中运行,这需要为没有 OneAgent 的环境手动指定 URL 和 API 令牌。除非明确配置为使用可用的配置选项将某些指标视为增量计数器,否则该插件主要将指标报告为 gauges。此功能使用户能够自定义发送到 Dynatrace 的指标的行为,从而利用该平台的强大功能进行全面的性能监控和可观测性。对于用户来说,确保 Dynatrace 和 Telegraf 都符合版本要求至关重要,从而在与 Dynatrace 生态系统集成时优化兼容性和性能。
配置
OPC UA
[[inputs.opcua]]
## Metric name
# name = "opcua"
#
## OPC UA Endpoint URL
# endpoint = "opc.tcp://localhost:4840"
#
## Maximum time allowed to establish a connect to the endpoint.
# connect_timeout = "10s"
#
## Maximum time allowed for a request over the established connection.
# request_timeout = "5s"
# Maximum time that a session shall remain open without activity.
# session_timeout = "20m"
#
## Security policy, one of "None", "Basic128Rsa15", "Basic256",
## "Basic256Sha256", or "auto"
# security_policy = "auto"
#
## Security mode, one of "None", "Sign", "SignAndEncrypt", or "auto"
# security_mode = "auto"
#
## Path to cert.pem. Required when security mode or policy isn't "None".
## If cert path is not supplied, self-signed cert and key will be generated.
# certificate = "/etc/telegraf/cert.pem"
#
## Path to private key.pem. Required when security mode or policy isn't "None".
## If key path is not supplied, self-signed cert and key will be generated.
# private_key = "/etc/telegraf/key.pem"
#
## Authentication Method, one of "Certificate", "UserName", or "Anonymous". To
## authenticate using a specific ID, select 'Certificate' or 'UserName'
# auth_method = "Anonymous"
#
## Username. Required for auth_method = "UserName"
# username = ""
#
## Password. Required for auth_method = "UserName"
# password = ""
#
## Option to select the metric timestamp to use. Valid options are:
## "gather" -- uses the time of receiving the data in telegraf
## "server" -- uses the timestamp provided by the server
## "source" -- uses the timestamp provided by the source
# timestamp = "gather"
#
## Client trace messages
## When set to true, and debug mode enabled in the agent settings, the OPCUA
## client's messages are included in telegraf logs. These messages are very
## noisey, but essential for debugging issues.
# client_trace = false
#
## Include additional Fields in each metric
## Available options are:
## DataType -- OPC-UA Data Type (string)
# optional_fields = []
#
## Node ID configuration
## name - field name to use in the output
## namespace - OPC UA namespace of the node (integer value 0 thru 3)
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque)
## identifier - OPC UA ID (tag as shown in opcua browser)
## tags - extra tags to be added to the output metric (optional); deprecated in 1.25.0; use default_tags
## default_tags - extra tags to be added to the output metric (optional)
##
## Use either the inline notation or the bracketed notation, not both.
#
## Inline notation (default_tags not supported yet)
# nodes = [
# {name="", namespace="", identifier_type="", identifier="", tags=[["tag1", "value1"], ["tag2", "value2"]},
# {name="", namespace="", identifier_type="", identifier=""},
# ]
#
## Bracketed notation
# [[inputs.opcua.nodes]]
# name = "node1"
# namespace = ""
# identifier_type = ""
# identifier = ""
# default_tags = { tag1 = "value1", tag2 = "value2" }
#
# [[inputs.opcua.nodes]]
# name = "node2"
# namespace = ""
# identifier_type = ""
# identifier = ""
#
## Node Group
## Sets defaults so they aren't required in every node.
## Default values can be set for:
## * Metric name
## * OPC UA namespace
## * Identifier
## * Default tags
##
## Multiple node groups are allowed
#[[inputs.opcua.group]]
## Group Metric name. Overrides the top level name. If unset, the
## top level name is used.
# name =
#
## Group default namespace. If a node in the group doesn't set its
## namespace, this is used.
# namespace =
#
## Group default identifier type. If a node in the group doesn't set its
## namespace, this is used.
# identifier_type =
#
## Default tags that are applied to every node in this group. Can be
## overwritten in a node by setting a different value for the tag name.
## example: default_tags = { tag1 = "value1" }
# default_tags = {}
#
## Node ID Configuration. Array of nodes with the same settings as above.
## Use either the inline notation or the bracketed notation, not both.
#
## Inline notation (default_tags not supported yet)
# nodes = [
# {name="node1", namespace="", identifier_type="", identifier=""},
# {name="node2", namespace="", identifier_type="", identifier=""},
#]
#
## Bracketed notation
# [[inputs.opcua.group.nodes]]
# name = "node1"
# namespace = ""
# identifier_type = ""
# identifier = ""
# default_tags = { tag1 = "override1", tag2 = "value2" }
#
# [[inputs.opcua.group.nodes]]
# name = "node2"
# namespace = ""
# identifier_type = ""
# identifier = ""
## Enable workarounds required by some devices to work correctly
# [inputs.opcua.workarounds]
## Set additional valid status codes, StatusOK (0x0) is always considered valid
# additional_valid_status_codes = ["0xC0"]
# [inputs.opcua.request_workarounds]
## Use unregistered reads instead of registered reads
# use_unregistered_reads = false
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"
输入和输出集成示例
OPC UA
-
基本配置:使用您的 OPC UA 服务器端点和所需的指标设置插件。这允许 Telegraf 开始从配置的节点收集指标。
-
节点 ID 设置:使用配置来指定特定的节点,例如温度传感器,以实时监控它们的值。例如,配置节点
ns=3;s=Temperature
以直接收集温度数据。 -
组配置:通过将多个节点分组在一个配置下,简化对它们的监控——这为该组中的所有节点设置默认值,从而减少设置中的冗余。
Dynatrace
-
云基础设施监控:利用 Dynatrace 插件来监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace 中。这种集成提供了资源利用率、应用程序性能和系统健康状况的整体视图,从而能够对各种云环境中的性能问题做出积极响应。
-
自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,实现自定义的应用程序特定指标。通过利用额外的计数器和维度选项,开发团队可以获得与应用程序的运营需求精确对齐的见解,从而进行有针对性的优化工作。
-
多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。
-
基于指标更改的自动警报:将 Dynatrace 输出插件与警报机制集成,该机制在特定指标超过定义的阈值时触发通知。这种情况涉及配置额外的计数器来监控关键的应用程序性能指标,从而能够快速采取补救措施以保持服务可用性和用户满意度。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。