[mrtg] Re: unknown OID problem

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Dec 20 01:17:59 MET 1999


Balthasar Indermuehle wrote:
> 
> Thanks for the quick response. However, the OID I'm querying can be
> queried like this:
> 
> [root at noc run]# snmpget xxx.xxx.xxx.xxx public 16.1.1.1.4.1
> 16.1.1.1.4.1 = 2636422410
> [root at noc run]# 
> 
> So that OID apparently is valid. I still don't understand why mrtg
> refuses to query this.
> Any other ideas?
> 

No, the **same** idea: This is not the complete OID.

I will try to explain once more; read carefully:

The snmpget and snmpwalk utilities do not require a full OID whereas
MRTG does need one.

When you ask this partial OID using snmpget, it does work.
This does not mean that it is the correct, full, OID.

The MIB is a tree of variables.  There are multiple knots where the
tree branches out.  These knots are the dots and the branches are the
numbers.  As most variables queried are from one part of the tree, this
part is made default.  This saves typing when using snmpget but causes
trouble when you don't understand it.  The default part is what I called
the prefix (I don't know if this is the right word to use).

You need to specify the correct prefix when using the OID in MRTG.
Similarly, you can specify only one OID for snmpget but you can't do
this for MRTG.  It is a different program, with different rules.

Try this:

[root at noc run]# snmpget xxx.xxx.xxx.xxx public .1.3.6.1.2.1.2.2.1.10.1
[root at noc run]# snmpget xxx.xxx.xxx.xxx public 2.2.1.10.1

The difference is that the ".1.3.6.1.2.1" part (the prefix) is left out.
You can use the first OID in MRTG but you cannot use the second one.

The snmpget utility will provide the same answer (perhaps a different
number as this is an octets counter).

The leading dot is the key to snmpget: if it is there, it is a full OID
and if it is not, it is not.

The correct prefix in this case is what you need to find out.  The most
likely case is a prefix of ".1.3.6.1.2.1" but this may be different.
When using it in your MRTG config file, skip the leading dot.  I'm not
sure if you still need to do so but I do think you should know that this
leading dot is not part of the OID.

Parts inside square brackets are optional:

For snmpwalk:     [ <dot> <prefix> ] <rest-of-OID>
For snmpget:      [ <dot> <prefix> ] <rest-of-OID> <instance>
For MRTG:         <prefix> <rest-of-oid> <instance>

This would be for the ifInOctets counter:

snmpwalk:     .1.3.6.1.2.1.2.2.1.10   or 2.2.1.10
snmpget:      .1.3.6.1.2.1.2.2.1.10.1 or 2.2.1.10.1
mrtg:         1.3.6.1.2.1.2.2.1.10.1

(snmpwalk will get *all* ifInOctets counters).

Just to be sure:

.1.3.6.1.2.1.2.2.1.10.1     is built from:

.                           leading dot for snmpget, not part of the OID
 1.3.6.1.2.1                prefix, optional for snmpget but not for MRTG
            .               dot linking the prefix and the suffix
             2.2.1.10       last part of OID
                     .      dot linking the OID and the instance
                      1     instance which is not part of the OID but needs
                            to be there for MRTG as this specifies the correct 
                            interface number.

regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list