use of org.opennms.netmgt.snmp.SnmpV2TrapBuilder in project opennms by OpenNMS.
the class SnmpTrapForwarderHelper method sendV2EventInform.
public void sendV2EventInform(Event event) throws UnknownHostException, SnmpTrapHelperException {
long trapTimeStamp = 0;
SnmpTrapBuilder trap = snmpTrapHelper.createV2Inform(".1.3.6.1.4.1.5813.1.1", Long.toString(trapTimeStamp));
trap = buildEventTrap(event, trap, null);
SnmpV2TrapBuilder inform = (SnmpV2TrapBuilder) trap;
try {
inform.sendInform(getIp(), getPort(), getTimeout(), getRetries(), getCommunity());
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations