Frank Fock | 3 Aug 2010 17:44
Favicon

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)

Mackay, Scott | 3 Aug 2010 18:23

Re: TreeUtils detecting issues with getSubtree results


That is good.  I am hoping that the loop and conditions I am checking are the accurate ones to detect this
particular issue.
Are the inner checks, isError()==true, getStatus()==TreeEvent.STATUS_REPORT, and finally
bind.getOid().equals(SnmpConstants.usmStatsNotInTimeWindows)==true the path to detect a
condition like this or is there another combination?  I am afraid I have not seen any material on the website
to get to the details as an example.

-Scott

-----Original Message-----
From: snmp4j-bounces@... on behalf of Frank Fock
Sent: Tue 8/3/2010 11:44 AM
To: Mackay, Scott
Cc: <snmp4j@...>
Subject: (nwl)  Re: [SNMP4J] 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  
(Continue reading)


Gmane