use of org.opennms.netmgt.model.events.EventBuilder in project opennms by OpenNMS.
the class ComponentEventQueue method getEvent.
private Event getEvent(final String uei, final ComponentIdentifier id) {
final EventBuilder builder = new EventBuilder(uei, "NCSComponentService");
builder.addParam("componentId", id.getId());
builder.addParam("componentType", id.getType());
builder.addParam("componentName", id.getName());
builder.addParam("componentForeignSource", id.getForeignSource());
builder.addParam("componentForeignId", id.getForeignId());
builder.addParam("dependencyRequirements", id.getDependencyRequirements().toString());
final Event event = builder.getEvent();
return event;
}
use of org.opennms.netmgt.model.events.EventBuilder in project opennms by OpenNMS.
the class ImpactProgagationRulesIT method createMplsLspPathDownEvent.
@SuppressWarnings("unused")
private Event createMplsLspPathDownEvent(int dbId, int nodeid, String ipaddr, String lspname) {
Event event = new EventBuilder("uei.opennms.org/vendor/Juniper/traps/mplsLspPathDown", "Test").setNodeid(nodeid).setInterface(addr(ipaddr)).addParam("mplsLspName", lspname).getEvent();
event.setDbid(dbId);
return event;
}
use of org.opennms.netmgt.model.events.EventBuilder in project opennms by OpenNMS.
the class NCSRestServiceIT method anticipateEvent.
private void anticipateEvent(final String uei, final String[] componentInfo) {
final EventBuilder builder = new EventBuilder(uei, "NCSComponentService");
builder.addParam("componentType", componentInfo[0]);
builder.addParam("componentName", componentInfo[1]);
builder.addParam("componentForeignSource", componentInfo[2]);
builder.addParam("componentForeignId", componentInfo[3]);
m_eventAnticipator.anticipateEvent(builder.getEvent());
}
use of org.opennms.netmgt.model.events.EventBuilder in project opennms by OpenNMS.
the class NotificationManagerIT method doTestNodeInterfaceServiceWithRule.
private void doTestNodeInterfaceServiceWithRule(String description, int nodeId, String intf, String svc, String rule, boolean matches) {
Notification notif = new Notification();
notif.setName("a notification");
notif.setRule(rule);
EventBuilder builder = new EventBuilder("uei.opennms.org/doNotCareAboutTheUei", "Test.Event");
builder.setNodeid(nodeId);
builder.setInterface(addr(intf));
builder.setService(svc);
assertEquals(description, matches, m_notificationManager.nodeInterfaceServiceValid(notif, builder.getEvent()));
}
use of org.opennms.netmgt.model.events.EventBuilder in project opennms by OpenNMS.
the class BusinessServiceManagerImpl method triggerDaemonReload.
@Override
public void triggerDaemonReload() {
EventBuilder eventBuilder = new EventBuilder(EventConstants.RELOAD_DAEMON_CONFIG_UEI, "BSM Master Page");
eventBuilder.addParam(EventConstants.PARM_DAEMON_NAME, "bsmd");
eventForwarder.sendNow(eventBuilder.getEvent());
}
Aggregations