如何设置snmptrap阈值

时间:2016-10-18 22:23:44

标签: monitoring snmp monitor net-snmp snmp4j

我想通过SNMP监控一些防火墙设备。

  • 到目前为止,我已经能够使用SNMP4J库实现CPU信息的检索。
  • 问题是我不知道如何设置和使用SNMP陷阱来异步地从设备获取相应的警告和错误消息。
  • 如何设置CPU阈值,以便在满足条件时发送SNMP陷阱。例如,如果CPU使用率超过70%,则应将陷阱发送到管理器PC。我应该通过命令在每个防火墙设备上设置此阈值,还是使用SNMP4J实现它?

我很困惑,请给我一些建议。提前谢谢。

1 个答案:

答案 0 :(得分:0)

Normally, it is the responsibility of the SNMP Agent to send out SNMP traps to notify NMS about certain alarm conditions. But in reality there are many SNMP agents that do not implement it. In this case you'll have to implement this functionality on the SNMP Manager (NMS) side. Basically all you have to do is the following:

  • Poll the device
  • Configure threshold values for polling results
  • Define traps/informs in MIB file
  • Configure the list of trap destinations
  • Send out SNMP traps/informs using SNMP4J in full accordance to MIB definition