This lab must be done on Linux-boxes. Start Linux and
log-in as root. MRTG is already installed on your Linux-boxes.
We will only configure it to show interface statistics for Cisco-router
'gwy.workshop.carnet.hr'. Configuration
file for MRTG is /etc/mrtg.cfg.
I. Configuration of /etc/mrtg.cfg
1. Go to /var/lib/mrtg directory. In this directory all
MRTG programs live. cfgmaker
tool will generate all router specific parts of your configuration file.
2. Execute the cfgmaker -
program ./cfgmaker public@gwy.workshop.carnet.hr
>> /etc/mrtg.cfg
3. Now you can look at /etc/mrtg.cfg for a while
- all you need to make MRTG works is automaticaly added at the end of this
file. (more /etc/mrtg.cfg)
II. Creating an overview page
There is a indexmaker script, which you can use to create a html page containing hrefs that point to your individual traffic statistics page. Generally, you need to edit this script, because it includes specific University Logo and Title of the author of MRTG, but we will not do this now.
4. Run indexmaker script: ./indexmaker /etc/mrtg.cfg gwy > /var/www/mrtg/index.html
III. Results
5. Start Netscape browser and look at the URL: http://lab1-XX.workshop.carnet.hr/mrtg
where lab1-XX is the name of your computer. (If
you do not know it execute 'hostname' command from the shell-prompt)
6. Browse through the pages and look the statistics for different interfaces.The
pages are refreshed every 5 minutes and data are accumulated on the graphs.
7. If you have time try to add into the /etc/mrtg.cfg configurations data for some other host/router you know it is running snmp in the community 'public' and you are allowed to get through the snmp this data.