[mrtg] Re: snmpwalk and mrtg

McDonald, Dan Dan.McDonald at austinenergy.com
Fri Dec 6 13:33:16 MET 2002

From: morten [mailto:mobo at mobo.dk]
>For cpu, I want to use ssCpuRawUser.0, ssCpuRawNice.0 and ssCpuRawSystem.0.
>When I use 
>        $ snmpwalk localhost public ssCpuRawUser.0
>I get
>        enterprises.ucdavis.systemStats.ssCpuRawUser.0 = Counter32: 3190808
>which is what I want. The problem is that mrtg doesn't accept this as an
>var. What to do?

Three options... you guessed the first one.

>My workaround was to use the entire oid, found using
>        $ snmpwalk localhost public ssCpuRawUser.0 -On
>and I have the OID
>        . = Counter32: 3193369
>This results in illegible target strings :-(

Option two:  use the LoadMibs: global configuration command.  LoadMibs has a
few limitations:
 * Only snmpv1 mibs can be parsed by the module.
 * Any dependencies not found hard coded in the module have to be LoadMib'ed
before the one you really want.
So, you might have a line like:
LoadMibs: /usr/local/share/snmp/mibs/ucdavis-smi-v1.mib
(I made up the names of the files, but that's the idea).

Option three: edit the oid-mib-cache.txt file found in the WorkDir:
directory and hard code your text-to-numeric oid mappings there.

>But this workaround only works for the cpu part. The output for the memory
>parts are all zero, with no errors.

cpu in this implementation is a counter (counts the number of ticks used, an
always increasing number), so the default options for mrtg work well.
memory is a gauge (value goes up and down as it sees fit) so you have to
tell mrtg to treat the variable like a gauge with options[device.cpu]:gauge

Daniel J McDonald, CCIE #2495, CNX
Lan/Wan Integrator
Austin Energy
dan.mcdonald at austinenergy.com

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

More information about the mrtg mailing list