Ejemplo n.º 1
0
  public boolean runSingleCollection(final int nodeId) {
    try {
      final LinkableNode node = m_queryMgr.getSnmpNode(nodeId);

      for (final SnmpCollection snmpColl :
          getSnmpCollections(nodeId, node.getSnmpPrimaryIpAddr(), node.getSysoid())) {
        snmpColl.setScheduler(m_scheduler);
        snmpColl.run();

        final DiscoveryLink link = getDiscoveryLink(snmpColl.getPackageName());
        link.setScheduler(m_scheduler);
        link.run();
      }

      return true;
    } catch (final SQLException e) {
      LogUtils.debugf(
          this,
          "runSingleCollection: unable to get linkable node from database with ID %d",
          nodeId);
    }
    return false;
  }