0
votes

I want to monitor some firewall devices via SNMP.

  • So far I've been able to implement retrieval of CPU information using SNMP4J library.
  • The problem is that I have no idea how to setup and use SNMP traps to get the corresponding warnings and error messages from device asynchronously.
  • How do I set the CPU threshold so that the SNMP trap will be sent based on that when condition met. For example, if the CPU usage goes above 70%, a trap should be sent to a manager PC. Should I set this threshold on every firewall device by command or implement it using SNMP4J?

I'm confused, please give me some advice on that. Thanks in advance.

1
It is not really clear what you're doing and trying to achieve. Are you trying to implement SNMP polling of network elements based on SNMP4J? Do you want to send out SNMP traps based on data received from NE? If yes then you need to implement this within the scope of your polling application including setting up thresholds for values and comparison algorithms.Andrew Komiagin
@AndrewKomiagin Yes,I wrote an application to monitor firewalls based on SNMP4J. Now I just implemented NMS side to get firewall info according to OID. For trap messages, do you mean I should also implement on agent side? If yes, should I deploy this agent on every device? I am afraid some devices cannot accept other applications.Wendy
You can implement traps on NMS side as well. Sure it is better if traps are implemented on agent side.Andrew Komiagin

1 Answers

0
votes

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