Re: Help understanding "OID not increasing"

Mark Gillott <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Thu, 2018-08-02 at 08:30 -0700, Bill Fenner wrote:
> On Tue, Jul 24, 2018 at 4:20 AM Mark Gillott 
> mail.com> wrote:
> > I have a generated a small enterprise MIB to represent some QoS
> > objects
> > (traffic classes, queue lengths, drops, tail drops, etc) for
> > particular
> > system. The whole thing is driven by a Perl pass-persist extension
> > script (using SNMP::Extension::PassPersist). With one exception it
> > all
> > works fine - objects get populated and the tables can be walked.
> > 
> > The exception is a table that is optional. That is a table
> > consisting
> > of a name and a counter that may not exist - all depends on the
> > underling configuration. Provided the object ("DSCP WRED Map")
> > exists
> > all is fine:
> > 
> > VM-1:$ snmpwalk -v2c -c public localhost ATT-VROUTER-QOS-
> > MIB::qosDSCPWREDMapTable
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapEntry.1.7.0.0.0.1 = INTEGER: 1
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapEntry.1.7.1.0.0.1 = INTEGER: 1
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapEntry.1.10.0.0.0.1 = INTEGER: 1
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapEntry.1.10.1.0.0.1 = INTEGER: 1
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapName.7.0.0.0.1 = STRING: test
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapName.7.1.0.0.1 = STRING: test
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapName.10.0.0.0.1 = STRING: test
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapName.10.1.0.0.1 = STRING: test
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapDropPkts.7.0.0.0.1 = Counter64:
> > 0
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapDropPkts.7.1.0.0.1 = Counter64:
> > 0
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapDropPkts.10.0.0.0.1 = Counter64:
> > 0
> > ATT-VROUTER-QOS-MIB::qosDSCPWREDMapDropPkts.10.1.0.0.1 = Counter64:
> > 0
> > VM-1:$ 
> > 
> > But if the underlying object has not been defined, I get:
> > 
> > VM-1:$ snmpwalk -v2c -c public localhost ATT-VROUTER-QOS-
> > MIB::qosDSCPWREDMapTable
> > ATT-VROUTER-QOS-MIB::qosShaperClass.7.0 = INTEGER: 7
> > Error: OID not increasing: ATT-VROUTER-QOS-MIB::qosDSCPWREDMapTable
> >  >= ATT-VROUTER-QOS-MIB::qosShaperClass.7.0
> > 
> > VM-1:$ snmpwalk -On -v2c -c public localhost ATT-VROUTER-QOS-
> > MIB::qosDSCPWREDMapTable
> > .1.3.6.1.4.1.74.1.32.1.1.1.1.1.7.0 = INTEGER: 7
> > Error: OID not increasing: .1.3.6.1.4.1.74.1.32.1.5.1
> >  >= .1.3.6.1.4.1.74.1.32.1.1.1.1.1.7.0
> > 
> > VM-1:$ 
> > 
> > The OID ".1.3.6.1.4.1.74.1.32.1.1.1.1.1.7.0" is the very first
> > element
> > of the MIB, i.e. the PassPersist module is walking the objects and
> > this
> > is the very first element. But why the complaint?
> The complaint is because the manager asked for the next object
> after  .1.3.6.1.4.1.74.1.32.1.5.1, and the agent
> returned .1.3.6.1.4.1.74.1.32.1.1.1.1.1.7.0, which is not after, it's
> before.  If snmpwalk did not complain and stop, it would never
> terminate.  Try "snmpwalk -Cc" to see this loop.
> 
> > Is there anything I can do to get PassPersist to return "no such
> > object"?
> If the table is the last item in your MIB module,  try returning
> "NONE".  Otherwise, return the next object after the table.
> 
Thanks for the reply. 
The trouble is, the core handler and OID database is maintained by
PassPersist. I cannot see a way for my controlling script to intercept
a request for .1.3.6.1.4.1.74.1.32.1.5.1, check for the existence of
the underlying object and return NONE (or the next object).
I guess I have to dig further into PassPersist module, see if there are
any hooks. Failing that it looks like I'd have to ditch PassPersist
library module and do everything myself - which is not going to be fun.
Mark
>   Bill
> 
> > 
> > Thanks,
> > 
> > Mark
> > 
> > -----------------------------------------------------------------
> > -------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Net-snmp-users mailing list
> > [email protected]
> > Please see the following page to unsubscribe or change other
> > options:
> > https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> >

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.