我正在编写 SNMPv2 代理并需要发送陷阱。
陷阱发送正常,但需要在情况恢复正常时清除陷阱。目前 SNMP 接收器仍处于警报状态,直到手动清除。
我还发送了另一个 OID 吗?我是 SNMP 新手。
最佳答案
清除逻辑在陷阱接收器端实现。这里的代理任务是为此目的发送另一个 SNMP 陷阱。最常用的场景是 RFC1157 和 RFC1215 中定义的 linkDown/linkUp 陷阱:
linkDown TRAP-TYPE
ENTERPRISE snmp
VARIABLES { ifIndex }
DESCRIPTION
"A linkDown trap signifies that the sending
protocol entity recognizes a failure in one of
the communication links represented in the
agent's configuration."
::= 2
linkUp TRAP-TYPE
ENTERPRISE snmp
VARIABLES { ifIndex }
DESCRIPTION
"A linkUp trap signifies that the sending
protocol entity recognizes that one of the
communication links represented in the agent's
configuration has come up."
::= 3
关于snmp - 清除 SNMP 陷阱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34219261/