目录
输入和输出集成概述
SNMP Trap Telegraf 插件能够接收 SNMP 通知,通过捕获来自网络设备的重要事件,促进全面的网络监控。
此插件将 Telegraf 指标保存到 Apache IoTDB 后端,支持会话连接和数据插入。
集成详情
SNMP Trap
SNMP Trap 插件充当 SNMP 通知的接收端点,这些通知被称为陷阱和信息请求。 它通过 UDP 运行,监听传入的通知,这些通知可以配置为在特定端口上到达。 此插件是网络监控和管理不可或缺的一部分,允许系统收集和响应从网络中各种设备(包括路由器、交换机和服务器)发送的 SNMP 陷阱。 该插件通过 SNMPv3 支持安全传输选项,启用身份验证和加密参数以保护敏感数据。 此外,它还为用户提供了配置 SNMP 多个方面的灵活性,例如 MIB 文件位置,使其能够适应各种环境和用例。 建议从已弃用的 netsnmp 后端过渡到更新的 gosmi 后端,以利用其增强的功能和支持。 实施此插件的用户可以有效地监控网络事件、自动化对陷阱的响应,并维护强大的网络监控基础设施。
IoTDB
Apache IoTDB(物联网数据库)是一个 IoT 原生数据库,具有高性能的数据管理和分析能力,可部署在边缘和云端。 其轻量级架构、高性能和丰富的功能集使其非常适合物联网工业领域中的海量数据存储、高速数据摄取和复杂分析。 IoTDB 与 Apache Hadoop、Spark 和 Flink 深度集成,进一步增强了其处理大规模数据和复杂处理任务的能力。
配置
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 = ""
IoTDB
[[outputs.iotdb]]
## Configuration of IoTDB server connection
host = "127.0.0.1"
# port = "6667"
## Configuration of authentication
# user = "root"
# password = "root"
## Timeout to open a new session.
## A value of zero means no timeout.
# timeout = "5s"
## Configuration of type conversion for 64-bit unsigned int
## IoTDB currently DOES NOT support unsigned integers (version 13.x).
## 32-bit unsigned integers are safely converted into 64-bit signed integers by the plugin,
## however, this is not true for 64-bit values in general as overflows may occur.
## The following setting allows to specify the handling of 64-bit unsigned integers.
## Available values are:
## - "int64" -- convert to 64-bit signed integers and accept overflows
## - "int64_clip" -- convert to 64-bit signed integers and clip the values on overflow to 9,223,372,036,854,775,807
## - "text" -- convert to the string representation of the value
# uint64_conversion = "int64_clip"
## Configuration of TimeStamp
## TimeStamp is always saved in 64bits int. timestamp_precision specifies the unit of timestamp.
## Available value:
## "second", "millisecond", "microsecond", "nanosecond"(default)
# timestamp_precision = "nanosecond"
## Handling of tags
## Tags are not fully supported by IoTDB.
## A guide with suggestions on how to handle tags can be found here:
## https://iotdb.apache.org/UserGuide/Master/API/InfluxDB-Protocol.html
##
## Available values are:
## - "fields" -- convert tags to fields in the measurement
## - "device_id" -- attach tags to the device ID
##
## For Example, a metric named "root.sg.device" with the tags `tag1: "private"` and `tag2: "working"` and
## fields `s1: 100` and `s2: "hello"` will result in the following representations in IoTDB
## - "fields" -- root.sg.device, s1=100, s2="hello", tag1="private", tag2="working"
## - "device_id" -- root.sg.device.private.working, s1=100, s2="hello"
# convert_tags_to = "device_id"
## Handling of unsupported characters
## Some characters in different versions of IoTDB are not supported in path name
## A guide with suggetions on valid paths can be found here:
## for iotdb 0.13.x -> https://iotdb.apache.org/UserGuide/V0.13.x/Reference/Syntax-Conventions.html#identifiers
## for iotdb 1.x.x and above -> https://iotdb.apache.org/UserGuide/V1.3.x/User-Manual/Syntax-Rule.html#identifier
##
## Available values are:
## - "1.0", "1.1", "1.2", "1.3" -- enclose in `` the world having forbidden character
## such as @ $ # : [ ] { } ( ) space
## - "0.13" -- enclose in `` the world having forbidden character
## such as space
##
## Keep this section commented if you don't want to sanitize the path
# sanitize_tag = "1.3"
输入和输出集成示例
SNMP Trap
-
集中式网络监控:将 SNMP Trap 插件集成到集中式监控解决方案中,以实时接收有关网络设备的警报。 通过配置插件以侦听来自各种路由器和交换机的陷阱,网络管理员可以快速响应问题,例如设备中断或超出临界阈值。 此设置可以实现主动管理和快速解决网络问题,从而最大限度地减少停机时间。
-
自动化事件响应:每当收到特定陷阱时,使用 SNMP Trap 插件触发自动化事件响应工作流程。 例如,如果检测到指示硬件故障的陷阱,则可以启动自动化脚本来收集诊断信息、通知支持人员,甚至尝试修复操作。 这种方法通过减少人工干预和加快响应时间来提高 IT 运营的效率。
-
网络性能分析:部署 SNMP Trap 插件以收集性能指标以及陷阱,从而全面了解网络健康状况。 通过将此数据聚合到分析平台中,网络团队可以分析趋势、识别瓶颈并根据历史数据优化性能。 这允许围绕网络升级或更改进行明智的决策和战略规划。
-
与警报系统集成:将 SNMP Trap 插件连接到 PagerDuty 或 Slack 等第三方警报系统。 收到预定义的陷阱后,插件可以将警报发送到这些系统,使团队能够立即收到重要网络事件的通知。 这种集成确保在正确的时间通知正确的人员,有助于保持高服务水平和快速解决问题。
IoTDB
-
实时 IoT 监控:利用 IoTDB 插件从各种 IoT 设备收集传感器数据,并将其保存在 Apache IoTDB 后端,从而促进对环境条件(如温度和湿度)的实时监控。 此用例使组织能够分析随时间变化的趋势,并根据历史数据做出明智的决策,同时利用 IoTDB 的高效存储和查询功能。
-
智慧农业数据收集:使用 IoTDB 插件从部署在田野中的智慧农业传感器收集指标。 通过将湿度水平、养分含量和大气条件传输到 IoTDB,农民可以访问有关最佳种植和浇水计划的详细见解,从而提高作物产量和资源管理水平。
-
能源消耗分析:利用 IoTDB 插件跟踪公用事业网络中智能电表的能源消耗指标。 这种集成使分析能够识别使用高峰并预测未来的消耗模式,最终支持节能措施和改进的公用事业管理。
-
自动化工业设备监控:使用此插件收集制造工厂中机器的运行指标,并将它们存储在 IoTDB 中进行分析。 此设置可以帮助识别低效率、预测性维护需求和操作异常,从而确保最佳性能并最大限度地减少意外停机时间。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提供意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。