mooli tayer has posted comments on this change. Change subject: tools: support snmp trap as a notification method. ......................................................................
Patch Set 15: (3 comments) http://gerrit.ovirt.org/#/c/22909/15/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/sender/snmp/SNMPEventSender.java File backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/sender/snmp/SNMPEventSender.java: Line 75: new OID(trapOID).append(3), Line 76: new OctetString(auditLogEvent.getLogTime().toString()))); Line 77: CommunityTarget target = new CommunityTarget(); Line 78: final String[] split = AuditLogEventSubscriber.getMethodAddress().split(":"); Line 79: target.setAddress(new UdpAddress(split[0] + "/" + (split.length > 1 ? split[1] : 162))); > why is the loop of sending to multiple managers is not here? This logic is in ConfigurationSubscribersProvider Line 80: target.setCommunity(new OctetString(prop.getProperty(NotificationProperties.SNMP_COMMUNITY))); Line 81: target.setVersion(SnmpConstants.version2c); Line 82: target.setRetries(2); Line 83: target.setTimeout(5000); Line 79: target.setAddress(new UdpAddress(split[0] + "/" + (split.length > 1 ? split[1] : 162))); Line 80: target.setCommunity(new OctetString(prop.getProperty(NotificationProperties.SNMP_COMMUNITY))); Line 81: target.setVersion(SnmpConstants.version2c); Line 82: target.setRetries(2); Line 83: target.setTimeout(5000); > I still do not understand these settings regarding udp. Me too. I will investigate it now and see if we need this. Line 84: snmp.send(v2pdu, target); Line 85: final EventSenderResult eventSenderResult = new EventSenderResult(); Line 86: eventSenderResult.setSent(true); Line 87: return eventSenderResult; Line 85: final EventSenderResult eventSenderResult = new EventSenderResult(); Line 86: eventSenderResult.setSent(true); Line 87: return eventSenderResult; Line 88: } catch (IOException e) { Line 89: throw new NotificationServiceException("Could not distribute snmp notification.", e); > Would be nice to have more details here in the message, you should at least Done Line 90: } Line 91: Line 92: } -- To view, visit http://gerrit.ovirt.org/22909 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0cd22d022ae535f45e046b09a2cbfadd837b465c Gerrit-PatchSet: 15 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: mooli tayer <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Doron Fediuck <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Martin Peřina <[email protected]> Gerrit-Reviewer: mooli tayer <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
