[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
> = 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 .
[root at noc run]# snmpget xxx.xxx.xxx.xxx public

The difference is that the "." 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 "." 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:     .   or
snmpget:      . or

(snmpwalk will get *all* ifInOctets counters).

Just to be sure:

.     is built from:

.                           leading dot for snmpget, not part of the OID                prefix, optional for snmpget but not for MRTG
            .               dot linking the prefix and the suffix
          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.

 / 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