SNMP and mrtg

mike neuliep mike at illiana.net
Tue Apr 24 19:12:56 CDT 2001


OK Eric, let's try something a little different:

Download and install mrtg version 2.9.10.  I think you already have this because
--vendor doesn't work in this version.  This way we'll at least be using
the same version.

Assuming your apache's document root is /var/www (the default for debian systems) mkdir a directory 
called mrtg (as root)

mkdir /var/www/mrtg

For the cfgmaker run this command:
cfgmaker --ifdesc=descr --descint --no-down --outputfile=/var/www/mrtg/router.cfg 
public at router-host-name

Edit your new router.cfg file and add the following two lines to the beginning
of the file:

WorkDir: /var/www/mrtg
WithPeak[_]: ymw

For the indexmaker run this command:
indexmaker --output=/var/www/mrtg/router.html --sort=descr /var/www/mrtg/router.cfg

Ignore the stupid errors indexmaker will generate here.

Add to cron:
*/5 * * * * /usr/local/bin/mrtg /var/www/mrtg/router.cfg

Run mrtg three times manually, you'll see a lot of errors, but just ignore them:
Do this three times:

/usr/local/bin/mrtg /var/www/mrtg/router.cfg

Point browser at webserver:
http://webserver-host-name/mrtg/router.html

Let me know what you see at this point.  It should be an empty graph, but let it
run about 30 minutes or so and you should start seeing something!

	Mike




More information about the Kclug mailing list