SNMP and mrtg
Eric Rossiter
rossiter at discoverynet.com
Tue Apr 24 20:53:51 CDT 2001
From: mike neuliep <mike at illiana.net>
> OK Eric, let's try something a little different:
Thanks Mike, I really appreciate your time and energy..
>
> 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.
That is the version I went out and got yesterday.
>
> 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/route
r.cfg public at router-host-name
1. Had to jump out to the man page....had to drop "file" off of
"--outputfile" (I was so proud of me for figuring that out =) )
2. The last part of the line above "public at router-host-name" still confuses
me.... our PRT routers here don't have hostnames, they have IP's...so for
the last part I entered " public at 192.168.x.x" Is this correct????
>
> Edit your new router.cfg file and add the following two lines to the
beginning
> of the file:
>
> WorkDir: /var/www/mrtg
> WithPeak[_]: ymw
Did that.
>
> 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.
Did that.
>
> Add to cron:
> */5 * * * * /usr/local/bin/mrtg /var/www/mrtg/router.cfg
Did that. Well I thought I did. I typed "crontab -e" at the root
prompt....and entered the line above. I have crontab configured to send me
email at night when my NFS and Samba mounted backups run. Right now I'm
getting email every five minutes that tells me the following:
/bin/sh: /usr/local/bin/mrtg: No such file or directory
So, should I enter "crontab -e" as user "eric" and enter the line above in
there so the root crontab entry doesn't send me email every five minutes??
I just did a find on mrtg and it returned the following:
/usr/bin/mrtg
/var/www/mrtg
/etc/mrtg
/home/httpd/html/mrtg
Should I edit the crontab entry to match /usr/bin/mrtg instead of
/usr/bin/local/mrtg???
>
> 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
Did that.
>
> Point browser at webserver:
> http://webserver-host-name/mrtg/router.html
The machine I am working on is my backup box, named "backup" running RH 6.2.
So, I entered
" http:// backup/mrtg/router.html"
Not Found
The requested URL /mrtg/router.html was not found on this server.
>
> 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
>
Just to clarify.... this box named backup, is not a web server... I have
Apache configured and running ( I get the default page when I fire up the
browser and go to http://localhost:80) so I'm not sure if I can even do
this....but from what I read....if I have traffic going through a router on
the network, I SHOULD be able to graph traffic from said router on any box,
right?????
The box our web stuff runs on (PicLan-IP (Specifically, Coyote web
server)for use with our software coded with Pick Basic) is a RH 5.2 box that
is not running Apache. Should I be trying to get this to run on that box?
Once again, thanks for all your help.
Eric
More information about the Kclug
mailing list