This process can delay a little, depending on the speed of its Internet, but valley the penalty to wait, therefore you it will have good and very trustworthy a list of packages.
OBS: As ADM of nets, I never suggest to use sources unstable in its Debian, not to compromise its net.
Installation and configuration
The Debian is known by its easiness in the hour to install packages, then we go there:
# apt-get install mrtg
Well simple, the MRTG already is installing and ready to be used, but we need to define some configurations in it, then we go there. Below we have a configuration that I defined and that functions perfectly, but will be necessary to clean its archive of current configuration, then we go there:
# echo > /etc/mrtg.cfg
Soon, the archive was clean, now goes to use our publisher to add the configurations in it.
# I came /etc/mrtg.cfg
#Configurando MRTG
WorkDir: /var/www/mrtg/
Htmldir: /var/www/mrtg/
to icondir: images/
Refresh: 300
Interval: 5
Language: portuguese
RunAsDaemon: Yes
#---------------------
# Monitorar eth1
# LOCAL NET
#---------------------
Target [eth1]: "cat /proc/net/dev grep eth1 awk - F": ""{print $2}" awk" {print $1} "; cat /proc/net/dev grep eth1 awk - F": ""{print $2}" awk" {print $9} '; echo - e; echo - and `
MaxBytes [eth1]: 1250000
Title [eth1]: eth1 - Use eth1
PageTop [eth1]: <H1>Estatísticas of the interfaces<BR>Utilização internal interface (eth1) </H1>
Options [eth1]: growright
OBS: It verifies which plate of net is of its local net, therefore in the configuration above mine he is eth1.
Made this, it saves the archive and it initiates mrtg for the first time:
# mrtg
It goes to create logs for the first time in the /var/www/mrtg/ folder.
Since I am contanto that all already are with installed Apache pointing with respect to the related folder.
The last adjustments
Now the waited hour arrived more, goes to test it. For this we must type in browser:
http://ip_do_server/mrtg/
Now that it comes a small jump of the cat, if you to give attention, when to have access the folder for the first time, it goes to list the generated archives, so that this does not happen, executes the command:
# ln - s /var/www/mrtg/eth1.html /var/www/mrtg/index.html
OBS: If eth0 will be its local net substitutes eth1 for the equivalent.
Also we can place it stops together initiating with the system, I particularly I prefer rcconf, that it is simple and efficient. Then we go there:
# apt-get install rcconf
Made this we will have that to create one link for mrtg in the /etc/init.d/ folder so that rcconf I can identify it, let us make:
# ln - sf /usr/bin/mrtg /etc/init.d/mrtg
Made this we will have access rcconf and we will mark in the menu the option which mrtg is, so that the same it initiates with the system.
Credits and gratefulness
It could not never leave to cite my friend Eduardo Radaelli, of Pave with flagstone, that was one of the directly responsible people so that this article was in air. You them my sincere gratefulness, therefore we beat of front with this problem that in haunted them has some time and to each day it was possible to improve it.
By Leonardo Berbert & Eduardo Radaelli
leoberbert at gmail.com
original document: http://www.vivaolinux.com.br/artigos/verArtigo.php?codigo=6054
Technorati : debian, mrtg
Del.icio.us : debian, mrtg
Ice Rocket : debian, mrtg
Flickr : debian, mrtg
Zooomr : debian, mrtg
Buzznet : debian, mrtg
Riya : debian, mrtg
43 Things : debian, mrtg
Read More...
Summary only...