OPC UA 和 Dynatrace 集成

强大的性能和简易的集成,由 Telegraf 提供支持,Telegraf 是 InfluxData 构建的开源数据连接器。

info

这不是大规模实时查询的推荐配置。为了实现查询和压缩优化、高速摄取和高可用性,您可能需要考虑 OPC UA 和 InfluxDB

5B+

Telegraf 下载量

#1

时序数据库
来源:DB Engines

1B+

InfluxDB 下载量

2,800+

贡献者

目录

强大的性能,无限的扩展

收集、组织和处理海量高速数据。当您将任何数据视为时序数据时,它都会更有价值。使用 InfluxDB,这是 #1 的时序平台,旨在与 Telegraf 一起扩展。

查看入门方法

输入和输出集成概述

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

  1. 基本配置:使用您的 OPC UA 服务器端点和所需的指标设置插件。这允许 Telegraf 开始从配置的节点收集指标。

  2. 节点 ID 设置:使用配置来指定特定的节点,例如温度传感器,以实时监控它们的值。例如,配置节点 ns=3;s=Temperature 以直接收集温度数据。

  3. 组配置:通过将多个节点分组在一个配置下,简化对它们的监控——这为该组中的所有节点设置默认值,从而减少设置中的冗余。

Dynatrace

  1. 云基础设施监控:利用 Dynatrace 插件来监控云基础设施设置,将来自 Telegraf 的实时指标馈送到 Dynatrace 中。这种集成提供了资源利用率、应用程序性能和系统健康状况的整体视图,从而能够对各种云环境中的性能问题做出积极响应。

  2. 自定义应用程序性能指标:通过配置 Dynatrace 输出插件以发送来自 Telegraf 的定制指标,实现自定义的应用程序特定指标。通过利用额外的计数器和维度选项,开发团队可以获得与应用程序的运营需求精确对齐的见解,从而进行有针对性的优化工作。

  3. 多环境指标管理:对于运行多个 Dynatrace 环境(例如,生产、暂存和开发)的组织,请使用此插件从单个 Telegraf 实例管理所有环境的指标。通过正确配置端点和 API 令牌,团队可以在整个 SDLC 中保持一致的监控实践,确保在开发过程的早期检测到性能异常。

  4. 基于指标更改的自动警报:将 Dynatrace 输出插件与警报机制集成,该机制在特定指标超过定义的阈值时触发通知。这种情况涉及配置额外的计数器来监控关键的应用程序性能指标,从而能够快速采取补救措施以保持服务可用性和用户满意度。

反馈

感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提供意见。请在 InfluxDB 社区 Slack 中提交您的反馈。

强大的性能,无限的扩展

收集、组织和处理海量高速数据。当您将任何数据视为时序数据时,它都会更有价值。使用 InfluxDB,这是 #1 的时序平台,旨在与 Telegraf 一起扩展。

查看入门方法

相关集成

HTTP 和 InfluxDB 集成

HTTP 插件从一个或多个 HTTP(S) 端点收集指标。它支持各种身份验证方法和数据格式的配置选项。

查看集成

Kafka 和 InfluxDB 集成

此插件从 Kafka 读取消息,并允许基于这些消息创建指标。它支持各种配置,包括不同的 Kafka 设置和消息处理选项。

查看集成

Kinesis 和 InfluxDB 集成

Kinesis 插件允许从 AWS Kinesis 流中读取指标。它支持多种输入数据格式,并提供使用 DynamoDB 的检查点功能,以实现可靠的消息处理。

查看集成