[mrtg] Re: Newbie answer from newbie question

Neil Calvert ncalvert at cabletron.com
Mon Nov 8 21:12:20 MET 1999


Elsie,

Maybe these are instanced OIDs. An instance means there is more than one
value. An example might be ifInOctets - this has as many different
values as you have interfaces on your device, because each one has its
own traffic statistics. The OID for ifInOctets is

.1.3.6.1.2.1.2.2.1.10

but in order to read this for say port 3 the OID becomes

.1.3.6.1.2.1.2.2.1.10.3

Perhaps you need to make the end of your OID not 0, but 1 thru 8. Just
an idea. Also try running the snmpwalk against only
1.3.6.1.4.1.429.4.2.1.10.0 on the device and see if anything is
returned. If it is indexed, you should see some information.

Neil

-----Original Message-----
From: Elsie Simonton <elsiels at srttel.com>
To: robin.burger at bms.com <robin.burger at bms.com>; mrtg at list.ee.ethz.ch
<mrtg at list.ee.ethz.ch>
Date: Monday, November 08, 1999 3:00 PM
Subject: [mrtg] Re: Newbie answer from newbie question


>Robin:
>Maybe I am not finding the right stuff to read as I still do not
understand this.  What I am trying to do is look at a modem rack with 8
modems on it.  When I do an snmpwalk, I end up with pages of info.
>So I went back to trying to use the numbers that we were given by the
manufacture which are
>.1.3.6.1.4.1.429.4.2.1.10.0&.1.3.6.1.4.1.429.4.2.1.10.0:p
>ublic at XXX.XXX.XXX
>I can not get a snmpget to work on these numbers and the info is blank.
>
>I understand the tree that you showed me yet with those numbers snmpget
did not work either.
>What reading am I missing to understand how this stuff works and where
to get the numbers for our machine.
>>>> Robin Burger <robin.burger at bms.com> 11/03 8:53 AM >>>
>
>NOTE To everyone:  If any of this is 'incorrect' let me know... I am
also just trying to figure out MRTG, SNMP and a couple of other items...
>
>
>
>
> Subject:  [mrtg] Re: How do I find 'every' MIB on my machine?
>    Date:  Tue, 02 Nov 1999 16:55:20 -0600
>    From:  Elsie Simonton <elsiels at srttel.com>
>      To:  robin.burger at bms.com, mrtg at list.ee.ethz.ch
>
>
>>> I am in training at my office (just out of college) and
>>> am trying to figure out this MIB thing.
>>> How do I query my device  a total control arc card
>>> (for 8 modem cards) to find the mib.
>>> I recently downloaded cmu then ran snmpget on
>>> interfaces.ifNumber.0.  The result I got said 172.
>
>
>((( 'Warning' this is for
># snmpget -V
>UCD-snmp version: 4.0.1
>'
>)))
>
># snmpwalk localhost public
>(( will list all of the OID's that are on your local system - you can
>   substitute the machine you are looking at's name in this location
>))
>
># snmpwalk localhost public | grep ifNumber
>interfaces.ifNumber.0 = 2
>(( just so that I can find out what it is that you did... ))
>
># snmpget -q -f localhost public interfaces.ifNumber.0
>.iso.org.dod.internet.mgmt.mib-2.interfaces.ifNumber.0 2
>(( so this gives us the OID that is complete, but we do not know
>    how to translate it...))
>
>
>(( in your 'mrtg-2.8.6/run/' directory you will find a file
>   called '''SNMP_util.pm''' that will help you translate
>   the simple ones
>))
>
>((( .iso.org.dod.internet.mgmt.mib-2.interfaces.ifNumber.0
>      1 . 3 . 6 .    1   . 2  .  1  .    2     .   1    .0
>
>           'iso' => '1',
>           'org' => '1.3',
>           'dod' => '1.3.6',
>      'internet' => '1.3.6.1',
>          'mgmt' => '1.3.6.1.2',
>         'mib-2' => '1.3.6.1.2.1',
>    'interfaces' => '1.3.6.1.2.1.2',
>      'ifNumber' => '1.3.6.1.2.1.2.1.0',
>
>
>)))
>
>(( if you check for a file called 'IF-MIB.txt' on your system
>   you can search for 'ifNumber' and look for the line that
>   looks like this...
>
>   ifNumber  OBJECT-TYPE
>   (( line 99 in IF-MIB.txt ))
>
>   Just below it you will find out another line that looks like
>   this
>
>       ::= { interfaces 1 }
>   (( line 106))
>
>   This means that 'ifNumber ~ interface 1' or in the translation
>   from the above OID, since we know that the preceding part
>   of the tree is 'interfaces', then we know we have the correct
>   'ifNumber' and now we look for 'interfaces'
>
>
>    interfaces   OBJECT IDENTIFIER ::= { mib-2 2 }
>   (( line 43 ))
>
>   So now we can look at it as walking the tree backwards...
>
>   .iso.org.dod.internet.mgmt.mib-2.interfaces.ifNumber.0
>                       'ifNumber' ~ interfaces.1
>               'interfaces' ~ mib-2.2
>
>   .iso.org.dod.internet.mgmt.mib-2.     2    .    1   .0
>
>    And so far the only other place I have found the rest of
>    the translation of the tree backwards is in 'SNMP_util.pm'.
>    In other words, you read it from right to left.
>    Makes for efficient lookup.
>
>    NOTE:  You can modify 'SNMP_util.pm' to add in your own 'specific'
>           OID's, but the better place is in the MRTG code as it
actually
>           has a place that calls 'SNMP_util.pm' and adds the ones
included
>           into MRTG into the rest that are in 'SNMP_util.pm'.
>
>))
>
>((( .iso.org.dod.internet.mgmt.mib-2.interfaces.ifNumber.0
>      1 . 3 . 6 .    1   . 2  .  1  .    2     .   1    .0
>      1.3.6.1.2.1.2.1.0
>
>So now we have a OID to use... right?
>)))
>
># snmpget localhost public 1.3.6.1.2.1.2.1.0
>Error in packet
>Reason: (noSuchName) There is no such variable name in this MIB.
>This name doesn't exist: system.sysUpTime.6.1.2.1.2.1.0
>((( seems that it didn't like that OID... turn out that
>    the 1.3.6.1.2.1 is defaulted... so try instead
>)))
>
># snmpget localhost public 2.1.0
>interfaces.ifNumber.0 = 2
>
>((( Now, for MRTG you have to use the full OID '1.3.6.1.2.1.2.1.0'
>    but when you do, if your '.cfg' file in your configs directory
>    is not done correctly - it 'Will not work'.
>
>    1) make sure you have a WorkDir set up:
>
>       WorkDir: /export/home/mrtg/data
>
>    2) make sure your target has the OID twice with an '&' in between
them.
>
> Target[localhost.fully.qualified.domain.com]:
1.3.6.1.2.1.2.1.0&1.3.6.1.2.1.2.1.0:public at localhost
>
>    3) Run MRTG and Check in your data directory that the
>       localhost.fully.qualified.domain.com.log file gets created.
>
>    4) When information in the '.log' doesn't increment modify the
>       '.cfg' file so that 'Options' uses 'gage absolute'.
>
>  Options[localhost.fully.qualified.domain.com.com]: gauge absolute
>
>    5) Re-Check '.log' file and you should see the numbers increase.
>
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
># egrep -v  '^#|^$' localhost.cfg
>WorkDir: /absolute/path/name/to/your/./mrtg/data
>Target[localhost.fully.qualified.domain.com]:
1.3.6.1.2.1.2.1.0&1.3.6.1.2.1.2.1.0:public at localhost
>RouterUptime[localhost.fully.qualified.domain.com]: public at localhost
>MaxBytes[localhost.fully.qualified.domain.com]: 100
>AbsMax[localhost.fully.qualified.domain.com]: 400
>Title[localhost.fully.qualified.domain.com]:    TBD
>WithPeak[localhost.fully.qualified.domain.com]: ymw
>Unscaled[localhost.fully.qualified.domain.com]: ymw
>ShortLegend[localhost.fully.qualified.domain.com]: %
>XSize[localhost.fully.qualified.domain.com]: 380
>YSize[localhost.fully.qualified.domain.com]: 100
>YLegend[localhost.fully.qualified.domain.com]: ifNumber
>Legend1[localhost.fully.qualified.domain.com]: What makes sense here
TBD
>Legend2[localhost.fully.qualified.domain.com]: TBD To Be Determined
>Legend3[localhost.fully.qualified.domain.com]: TBD
>Legend4[localhost.fully.qualified.domain.com]: TBD
>LegendI[localhost.fully.qualified.domain.com]: TBD
>LegendO[localhost.fully.qualified.domain.com]:
>Options[localhost.fully.qualified.domain.com]: gauge absolute
>PageTop[localhost.fully.qualified.domain.com]: <H1>TBD</H1>
> </H1>
> <TABLE>
>   <TR><TD>System:</TD><TD>localhost in Look behind you</TD></TR>
>   <TR><TD>Maintainer:</TD><TD>Your Name goes here
<Mail.address at nice.to.givelIER ::= { mib-2 2 }
>   (( line> </TD></TR>
>   <TR><TD>Interface:</TD><TD>TBD</TD></TR>
>   <TR><TD>IP:</TD><TD>localhost.fully.qualified.domain.com
(ip.numbers.go.here)</TD></TR>
>   <TR><TD>Filled in automatically</TD>
>       <TD>filled in automatically</TD></TR>
>  </TABLE>
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
>
>>> When I put this info in MRTG  .1.3.6.1.2.1.2.0.172
>>> it doesn't like it.  What am I misreading or what else
>>> do I need to read in order to understand the mibs better?
>>> Thank you anyone for helping me as I am currently lost.
>
>How does that look... make any better sense?
>
>
>Robin
>
>
>
>--
>* To unsubscribe from the mrtg mailing list, send a message with the
>  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
>* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg
>

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list