use of org.opennms.netmgt.snmp.SnmpTrapBuilder in project opennms by OpenNMS.
the class SnmpTrapForwarderHelper method sendV2AlarmTrap.
public void sendV2AlarmTrap(Event event, boolean sync) throws UnknownHostException, SnmpTrapHelperException {
long trapTimeStamp = 0;
SnmpTrapBuilder trap = snmpTrapHelper.createV2Trap(".1.3.6.1.4.1.5813.1.3", Long.toString(trapTimeStamp));
trap = buildAlarmTrap(event, sync, trap);
try {
trap.send(getIp(), getPort(), getCommunity());
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations