/** * detectAgents * * @param currentPhase a {@link org.opennms.core.tasks.BatchTask} object. */ public void detectAgents(final BatchTask currentPhase) { if (!isAborted()) { final OnmsNode node = getNode(); final OnmsIpInterface primaryIface = m_provisionService.getPrimaryInterfaceForNode(node); if (primaryIface != null && primaryIface.getMonitoredServiceByServiceType("SNMP") != null) { LOG.debug( "Found primary interface and SNMP service for node {}/{}/{}", node.getId(), node.getForeignSource(), node.getForeignId()); onAgentFound(currentPhase, primaryIface); } else { LOG.debug( "Failed to locate primary interface and SNMP service for node {}/{}/{}", node.getId(), node.getForeignSource(), node.getForeignId()); } } }