Mrtg On Ubuntu

Network stats in less than 5 minutes !

from http://ubuntuforums.org/showthread.php?t=384328&highlight=mrtg

this is a quick howto to setup graphical stats w/ mrtg and snmpd

prerequisite : apache2

step 1 : install snmpd and mrtg

sudo apt-get install snmpd mrtg

step 2 : configure and restart snmpd

sudo nano /etc/snmp/snmpd.conf

change

com2sec paranoid default public
#com2sec readonly default public

into

#com2sec paranoid default public
com2sec readonly default public

restart snmpd

sudo /etc/init.d/snmpd stop
sudo /etc/init.d/snmpd start

step 3 : configure mrtg

run as root

cfgmaker public@localhost > /etc/mrtg.cfg
indexmaker /etc/mrtg.cfg > /var/www/mrtg/index.html
LANG=C mrtg
LANG=C mrtg

the two calls of mrtg after configuring initiates the mrtg values and create initial emptys graphs.

then you can check your stats at http://localhost/mrtg/