3 Aug 2010 17:44
Re: TreeUtils detecting issues with getSubtree results
Hi Scott, Normally the last entry in the list has the error. Any other case would indicate an abnormal behavior of the agent. Best regards, Frank Von meinem iPhone gesendet Am 03.08.2010 um 15:36 schrieb "Mackay, Scott" <scott.mackay@...>: > A sanity check, in case anyone has processed the error results > before... > It looks like the List of TreeEvents holds the information. > for each TreeEvent entry you can do a .isError(). I think the > detection would be as follows: > > for (int i = 0; i < results.size(); i++) { > TreeEvent tresult = (TreeEvent) results.get(i); > if (tresult.isError()==true) { > if (tresult.getStatus()==TreeEvent.STATUS_REPORT){ > VariableBinding[] > bindings=tresult.getVariableBindings(); > for (VariableBinding bind:bindings) { > if (bind.getOid().equals > (SnmpConstants.usmStatsNotInTimeWindows)==true) { > result.badTimeWindow=true; > break; > }(Continue reading)
RSS Feed