[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 188.8.131.52.4.1
> 184.108.40.206.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.
[root at noc run]# snmpget xxx.xxx.xxx.xxx public .220.127.116.11.18.104.22.168.1.10.1
[root at noc run]# snmpget xxx.xxx.xxx.xxx public 22.214.171.124.1
The difference is that the ".126.96.36.199.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 ".188.8.131.52.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: .184.108.40.206.220.127.116.11.1.10 or 18.104.22.168
snmpget: .22.214.171.124.126.96.36.199.1.10.1 or 188.8.131.52.1
(snmpwalk will get *all* ifInOctets counters).
Just to be sure:
.184.108.40.206.220.127.116.11.1.10.1 is built from:
. leading dot for snmpget, not part of the OID
18.104.22.168.2.1 prefix, optional for snmpget but not for MRTG
. dot linking the prefix and the suffix
22.214.171.124 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
/ 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
More information about the mrtg