[olug] Debian MRTG Help

Obi-Wan obiwan at jedi.com
Mon Mar 31 17:04:26 UTC 2008


> I'm having a hard time with SNMP and MRTG on a Debian Machine. While
> I can get OID numeric strings to work I can get any MIBS to work. I'll
> have to go back and get the exact error.when I'm back at the computer.
> but it says something like unable to translate and it goes through a
> large list of MIBs Not only do MIBs strings not work locally on the
> same machine I can pull them up from remote servers and deviced. Not
> sure I'm using the term. MIBs exactly correct but it's the Alpha
> character verssions I can get to work. Wish I was some place right now
> where I could get more data and logs but that will have to wait. If I
> could just get a working howto URL that would be great. So far every
> URL that I've googled has a different wa to do MRTG. I suspect the
> howto's where written for the Sarge version because most howtos have
> things I dont have. As an example while I do have an /etc/init.d/snmpd
> I dont have an /etc/init.d/snmp file and yes SNMP is installed. I've
> even uninstalled SNMP several times and reinstalled.

I'm a little fuzzy on what you're saying.  The exact error messages
would help.  When I was setting this up eons ago, I found these two
helpful:

	http://net-snmp.sourceforge.net/tutorial/
	http://www.dpstele.com/index.php

What happens if you run:

	snmpwalk -v 1 -c public localhost 1.3.6.1.2.1.2
	snmpwalk -v 1 -c public localhost if
	snmptranslate -Tp 1.3.6.1.2.1.2

(replace "public" with your community string if necessary)
The first two should both pull the interface tree, one by OID and
one by MIB.

What's in /usr/share/snmp/mibs?

In your /etc/mrtg.cfg, do you have a line like:

	LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt,/usr/share/snmp/mibs/LM-SENSORS-MIB.txt

Here's a snippet from my /etc/mrtg.cfg to monitor interface eth2:

	### Interface eth2
	#Target[localhost-eth2]: 1.3.6.1.2.1.2.2.1.10.2&1.3.6.1.2.1.2.2.1.16.2:public at localhost
	Target[localhost-eth2]: ifInOctets.2&ifOutOctets.2:public at localhost * 8
	MaxBytes[localhost-eth2]: 768000
	Options[localhost-eth2]: growright
	Title[localhost-eth2]: LAN Traffic (eth2)
	YLegend[localhost-eth2]: Bits/s
	ShortLegend[localhost-eth2]: Bits/s
	LegendI[localhost-eth2]: Bits/s In
	LegendO[localhost-eth2]: Bits/s Out
	Legend1[localhost-eth2]: Bits/s In
	Legend2[localhost-eth2]: Bits/s Out
	PageTop[localhost-eth2]: <H1>LAN Traffic</H1>
	 <TABLE>
		<TR><TD>Description:</TD><TD>eth2</TD></TR>
		<TR><TD>Max Speed:</TD>  <TD>1 Gbps</TD></TR>
		<TR><TD>IP:</TD>         <TD>192.168.225.2</TD></TR>
	 </TABLE>


-- 
Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com
   The stuff of earth competes for the allegiance I owe only to the
     Giver of all good things, so if I stand, let me stand on the
       promise that You will pull me through.  -- Rich Mullins



More information about the OLUG mailing list