reading MAN pages.
Reading DOC files
Reading websites.
etc..
but ok, i am not a mrtg guru, but i can provide a litle help and basic config.
consider this, below is working here on a openBSD 4.9 box (with) routers2cgi script, but can be bypassed.
Be aware that MRTG is a SNMP puller, so it pulls default ONLY SNMP data from a device.
so make sure you ENABLE the SNMP fucktion.
1: make sure you installed it over your nix distro system.
2: check all flags.
3: check http config, some apache configs refuse to pull cgi scripts in chroot mode. (use a hello.pl for test in cgi-bin)
4: maning cfgmaker xD
4a: or, cfgmaker 192.168.1.1 --output=/etc/mrtg.tmp (this pulls snmp config from 192.168.1.1 and write in to /etc/mrtg.tmp where you can edit it,and copying it when done to mrtg.cfg)
4b: or if you get the clue of it, editing it all by hand)
5: 1st at all MRTG does NOT make stats at its own,.you need to crontab over a spec time.
example of my pulling mrtg cfg.
crontab entry: 0-59/2 * * * * /usr/local/bin/mrtg /etc/mrtg/mrtg.cfg --logging /var/log/mrtg/mrtg.log
This pulls every 2 minutes snmp data from device.
not recomended on SLOW machines xD
mrtg.cfg (BASIC pull of router SNMP) (this pulls my ADLS snmp data from my draytek rig)
WorkDir: /var/www/htdocs/mrtg
Options[_]: growright,bits
EnableIPv6: no
#remove the below 2 #'s if you know what you are doing !!
#PathAdd: /usr/local/bin
#LogFormat: rrdtool
#----------------------------------------------------------------------
Target[DrayTek_4]: 4
ublic@192.168.1.1:
SetEnv[DrayTek_4]: MRTG_INT_IP="" MRTG_INT_DESCR="DrayTek ADSL-Line"
MaxBytes[DrayTek_4]: 10000000
Title[DrayTek_4]: DrayTek Vigor 2600i Traffic Analysis for ADSL Line
PageTop[DrayTek_4]: <h1>DrayTek Vigor 2600i Traffic Analysis for ADSL Line</h1>
<div id="sysdetails">
<table>
<tr><td>System:</td><td> in </td></tr>
<tr><td>Maintainer:</td><td>info@draytek.com.tw</td></tr>
<tr><td>Description:</td><td>ADSL </td></tr>
<tr><td>ifType:</td><td>Asymetric Digitial Subscriber Loop (ADSL) (94)</td></tr>
<tr><td>ifName:</td><td></td></tr>
<tr><td>Max Speed:</td><td>10 MBytes/s</td></tr>
</table>
</div>
#----------------------------------------------------------------------
when done saving.
mrtg /etc/mrtg.cfg --check
This checks for errors (basic errors it is)
Than.
indexmaker /etc/mrtg.cfg --output=/var/path to your htdocs/mrtg/index.html
enable the CRON entry,and wait a few minutes (if not done already.)
fire up browser ,type
http://localhost/mrtg/index.html
see your ADSL line speed (as example)
well, uhm,ok, thats it..
EXTENED versions..
you can hack in it, by using external program.
Again, READ 1st 3 line in message.
i extended my mrtg with routers2cgi
using statgrab.