[SNMP4J] How to hook up a trap trigger from application?

Binh Le lpbinh at gmail.com
Thu Jun 2 23:24:11 CEST 2011


Greetings,

I'm new to SNMP4J so forgive me if I'm taking a foreign language as example :).

In NetSNMP/C for example, we can just define a function
send_xyz_trap(int value1, int value2, ...) and call the function from
wherever a trap is need to be triggered.

Can someone please help to tell whether we can do that, and how, via SNMP4J?

Let take snmp4jAgentHBEvent in SNMP4J-HEARTBEAT-MIB as the example.
How can I trigger the trap from with just a passing Counter32 value
(snmp4jAgentHBCtrlEvents which is a varbind of the snmp4jAgentHBEvent
notification, per the MIB's definition) from another java class, and
the notification will be sent to all trap receivers defined in V3
related MIBs?

Thanks,
Binh



More information about the SNMP4J mailing list