use of org.opennms.netmgt.snmp.SnmpV3TrapBuilder in project opennms by OpenNMS.
the class SnmpTrapForwarderHelper method sendV3EventInform.
public void sendV3EventInform(Event event) throws UnknownHostException, SnmpTrapHelperException {
long trapTimeStamp = 0;
SnmpTrapBuilder trap = snmpTrapHelper.createV3Inform(".1.3.6.1.4.1.5813.1.1", Long.toString(trapTimeStamp));
trap = buildEventTrap(event, trap, null);
SnmpV3TrapBuilder inform = (SnmpV3TrapBuilder) trap;
try {
inform.sendInform(getIp(), getPort(), getTimeout(), getRetries(), getSecurityLevel(), getSecurityname(), getAuthPassPhrase(), getAuthProtocol(), getPrivPassPhrase(), getPrivprotocol());
} catch (Exception e) {
e.printStackTrace();
}
}
use of org.opennms.netmgt.snmp.SnmpV3TrapBuilder in project opennms by OpenNMS.
the class SnmpTrapForwarderHelper method sendV3EndSyncTrap.
public void sendV3EndSyncTrap() {
long trapTimeStamp = 0;
try {
SnmpV3TrapBuilder trap = snmpTrapHelper.createV3Trap(".1.3.6.1.4.1.5813.1.6", Long.toString(trapTimeStamp));
trap.send(getIp(), getPort(), getSecurityLevel(), getSecurityname(), getAuthPassPhrase(), getAuthProtocol(), getPrivPassPhrase(), getPrivprotocol());
} catch (Exception e) {
e.printStackTrace();
}
}
use of org.opennms.netmgt.snmp.SnmpV3TrapBuilder in project opennms by OpenNMS.
the class SnmpTrapForwarderHelper method sendV3EventTrap.
public void sendV3EventTrap(Event event) throws UnknownHostException, SnmpTrapHelperException {
long trapTimeStamp = 0;
SnmpTrapBuilder trap = snmpTrapHelper.createV3Trap(".1.3.6.1.4.1.5813.1.1", Long.toString(trapTimeStamp));
trap = buildEventTrap(event, trap, null);
SnmpV3TrapBuilder v3trap = (SnmpV3TrapBuilder) trap;
try {
v3trap.send(getIp(), getPort(), getSecurityLevel(), getSecurityname(), getAuthPassPhrase(), getAuthProtocol(), getPrivPassPhrase(), getPrivprotocol());
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations