SNMP Trap 和 InfluxDB 集成

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

50 亿+

Telegraf 下载量

#1

时间序列数据库
来源:DB Engines

10 亿+

InfluxDB 下载量

2,800+

贡献者

目录

强大的性能,无限的扩展

收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。使用 InfluxDB,由 Telegraf 构建的排名第一的时间序列平台,可随需扩展。

查看入门方法

输入和输出集成概述

SNMP Trap Telegraf 插件可以接收 SNMP 通知,通过捕获来自网络设备的重要事件,促进全面的网络监控。

InfluxDB 插件将指标写入 InfluxDB HTTP 服务,从而可以高效地存储和检索时间序列数据。

集成详情

SNMP Trap

SNMP Trap 插件充当 SNMP 通知(称为陷阱和信息请求)的接收端点。它通过 UDP 运行,监听传入的通知,这些通知可以配置为在特定端口到达。此插件是网络监控和管理不可或缺的一部分,使系统能够收集和响应从网络中各种设备(包括路由器、交换机和服务器)发送的 SNMP 陷阱。该插件通过 SNMPv3 支持安全传输选项,从而可以配置身份验证和加密参数以保护敏感数据。此外,它还为用户提供了配置 SNMP 多个方面的灵活性,例如 MIB 文件位置,使其能够适应各种环境和用例。建议从已弃用的 netsnmp 后端过渡到更新的 gosmi 后端,以利用其增强的功能和支持。实施此插件的用户可以有效地监控网络事件、自动响应陷阱并维护强大的网络监控基础设施。

InfluxDB

InfluxDB Telegraf 插件用于将指标发送到 InfluxDB HTTP API,从而促进以结构化方式存储和查询时间序列数据。该插件与 InfluxDB 无缝集成,提供诸如基于令牌的身份验证以及对多个 InfluxDB 集群节点的支持等基本功能,从而确保可靠且可扩展的数据摄取。通过其可配置性,用户可以指定诸如组织、目标存储桶和 HTTP 特定设置等选项,从而灵活地定制数据的发送和存储方式。该插件还支持敏感数据的密钥管理,从而增强了生产环境中的安全性。在实时分析和时间序列数据存储至关重要的现代可观测性堆栈中,此插件尤其有益。

配置

SNMP Trap

[[inputs.snmp_trap]]
  ## Transport, local address, and port to listen on.  Transport must
  ## be "udp://".  Omit local address to listen on all interfaces.
  ##   example: "udp://127.0.0.1:1234"
  ##
  ## Special permissions may be required to listen on a port less than
  ## 1024.  See README.md for details
  ##
  # service_address = "udp://:162"
  ##
  ## Path to mib files
  ## Used by the gosmi translator.
  ## To add paths when translating with netsnmp, use the MIBDIRS environment variable
  # path = ["/usr/share/snmp/mibs"]
  ##
  ## Deprecated in 1.20.0; no longer running snmptranslate
  ## Timeout running snmptranslate command
  # timeout = "5s"
  ## Snmp version; one of "1", "2c" or "3".
  # version = "2c"
  ## SNMPv3 authentication and encryption options.
  ##
  ## Security Name.
  # sec_name = "myuser"
  ## Authentication protocol; one of "MD5", "SHA", "SHA224", "SHA256", "SHA384", "SHA512" or "".
  # auth_protocol = "MD5"
  ## Authentication password.
  # auth_password = "pass"
  ## Security Level; one of "noAuthNoPriv", "authNoPriv", or "authPriv".
  # sec_level = "authNoPriv"
  ## Privacy protocol used for encrypted messages; one of "DES", "AES", "AES192", "AES192C", "AES256", "AES256C" or "".
  # priv_protocol = ""
  ## Privacy password used for encrypted messages.
  # priv_password = ""

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

输入和输出集成示例

SNMP Trap

  1. 集中式网络监控:将 SNMP Trap 插件集成到集中式监控解决方案中,以实时接收有关网络设备的警报。通过配置插件以侦听来自各种路由器和交换机的陷阱,网络管理员可以快速响应问题,例如设备中断或超出关键阈值。此设置可以实现主动管理和快速解决网络问题,从而最大限度地减少停机时间。

  2. 自动化事件响应:每当收到特定陷阱时,使用 SNMP Trap 插件触发自动化事件响应工作流程。例如,如果检测到指示硬件故障的陷阱,则可以启动自动化脚本来收集诊断信息、通知支持人员,甚至尝试补救措施。这种方法通过减少人工干预并加快响应时间来提高 IT 运营效率。

  3. 网络性能分析:部署 SNMP Trap 插件以收集性能指标以及陷阱,以全面了解网络运行状况。通过将这些数据聚合到分析平台中,网络团队可以分析趋势、识别瓶颈并根据历史数据优化性能。这有助于围绕网络升级或更改做出明智的决策和战略规划。

  4. 与警报系统集成:将 SNMP Trap 插件连接到 PagerDuty 或 Slack 等第三方警报系统。收到预定义的陷阱后,该插件可以将警报发送到这些系统,使团队能够立即收到有关重要网络事件的通知。这种集成确保在正确的时间通知正确的人员,从而有助于维持高服务水平和快速解决问题。

InfluxDB

  1. 实时系统监控:利用 InfluxDB 插件捕获和存储来自各种系统组件的指标,例如 CPU 使用率、内存消耗和磁盘 I/O。通过将这些指标推送到 InfluxDB 中,您可以创建一个实时仪表板,以可视化实时系统性能。此设置不仅有助于识别性能瓶颈,还有助于通过分析长期趋势进行主动容量规划。

  2. Web 应用程序的性能跟踪:自动收集与 Web 应用程序性能相关的指标(例如请求持续时间、错误率和用户交互)并将其推送到 InfluxDB。通过在监控堆栈中使用此插件,您可以使用存储的指标生成报告和分析,以帮助了解用户行为和应用程序效率,从而指导开发和优化工作。

  3. 物联网数据聚合:利用 InfluxDB Telegraf 插件从各种物联网设备收集传感器数据,并将其存储在集中式 InfluxDB 实例中。此用例使您能够分析环境或机器数据随时间变化的趋势和模式,从而促进更智能的决策和预测性维护策略。通过将物联网数据集成到 InfluxDB 中,组织可以利用历史数据分析的力量来推动创新和运营效率。

  4. 分析历史指标以进行预测:设置 InfluxDB 插件以将历史指标数据发送到 InfluxDB,并使用它来驱动预测模型。通过分析过去的性能指标,您可以创建预测未来趋势和需求的预测模型。此应用程序对于商业智能目的尤其有用,可帮助组织根据历史使用模式为资源需求的波动做好准备。

反馈

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

强大的性能,无限的扩展

收集、组织和处理海量高速数据。当您将任何数据视为时间序列数据时,它都更有价值。使用 InfluxDB,由 Telegraf 构建的排名第一的时间序列平台,可随需扩展。

查看入门方法

相关集成

HTTP 和 InfluxDB 集成

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

查看集成

Kafka 和 InfluxDB 集成

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

查看集成

Kinesis 和 InfluxDB 集成

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

查看集成