use of org.opennms.netmgt.config.SnmpEventInfo in project opennms by OpenNMS.
the class Collectd method handleConfigureSNMP.
/**
* This method is responsible for handling configureSNMP events.
*
* @param event
* The event to process.
*/
private void handleConfigureSNMP(final Event event) {
LOG.debug("configureSNMPHandler: processing configure SNMP event...", event);
SnmpEventInfo info = null;
try {
info = new SnmpEventInfo(event);
if (StringUtils.isBlank(info.getFirstIPAddress())) {
LOG.error("configureSNMPHandler: event contained invalid firstIpAddress. {}", event);
return;
}
LOG.debug("configureSNMPHandler: processing configure SNMP event: {}", info);
SnmpPeerFactory.getInstance().define(info);
SnmpPeerFactory.getInstance().saveCurrent();
LOG.debug("configureSNMPHandler: process complete. {}", info);
} catch (Throwable e) {
LOG.error("configureSNMPHandler: ", e);
}
}
Aggregations