public static List<SnmpValue> getColumns(final SnmpAgentConfig agentConfig, final String name, final SnmpObjId oid) throws InterruptedException { final List<SnmpValue> results = new ArrayList<>(); try(SnmpWalker walker=SnmpUtils.createWalker(agentConfig, name, new ColumnTracker(oid) { @Override protected void storeResult(SnmpResult res) { results.add(res.getValue()); } })) { walker.start(); walker.waitFor(); } return results; }
public static Map<SnmpInstId, SnmpValue> getOidValues(SnmpAgentConfig agentConfig, String name, SnmpObjId oid) throws InterruptedException { final Map<SnmpInstId, SnmpValue> results = new LinkedHashMap<SnmpInstId, SnmpValue>(); try(SnmpWalker walker=SnmpUtils.createWalker(agentConfig, name, new ColumnTracker(oid) { @Override protected void storeResult(SnmpResult res) { results.put(res.getInstance(), res.getValue()); } })) { walker.start(); walker.waitFor(); } return results; }
public static List<SnmpValue> getColumns(SnmpAgentConfig agentConfig, String name, SnmpObjId oid) throws InterruptedException { final List<SnmpValue> results = new ArrayList<SnmpValue>(); SnmpWalker walker=SnmpUtils.createWalker(agentConfig, name, new ColumnTracker(oid) { @Override protected void storeResult(SnmpResult res) { results.add(res.getValue()); } }); walker.start(); walker.waitFor(); return results; }
public static Map<SnmpInstId, SnmpValue> getOidValues(SnmpAgentConfig agentConfig, String name, SnmpObjId oid) throws InterruptedException { final Map<SnmpInstId, SnmpValue> results = new LinkedHashMap<SnmpInstId, SnmpValue>(); SnmpWalker walker=SnmpUtils.createWalker(agentConfig, name, new ColumnTracker(oid) { @Override protected void storeResult(SnmpResult res) { results.put(res.getInstance(), res.getValue()); } }); walker.start(); walker.waitFor(); return results; }
protected void waitForSignal() throws InterruptedException { try { m_walker.waitFor(); } finally { m_walker.close(); } } }
try (SnmpWalker walker = SnmpUtils.createWalker(agentConfig, "NetScalerGroupHealthMonitor", tracker)) { walker.start(); walker.waitFor();
/** {@inheritDoc} */ @Override public void scan(ScanContext context) throws InterruptedException { InetAddress agentAddress = context.getAgentAddress("SNMP"); if (agentAddress == null) { return; } SnmpAgentConfig agentConfig = m_snmpAgentConfigFactory.getAgentConfig(agentAddress, null); try(SnmpWalker walker = SnmpUtils.createWalker(agentConfig, getName(), createCollectionTracker(context))) { walker.start(); walker.waitFor(); } }
walker.start(); try { walker.waitFor(); } catch (InterruptedException e) { logger.error("Interuppted while waiting for collector. Results may be incomplete.", e);
try(SnmpWalker walker = SnmpUtils.createWalker(agentConfig, "HostResourceSwRunMonitor", tableTracker)) { walker.start(); walker.waitFor();