Ola a todos!
Ai vai o meu MRTG que e bem simples:
# cat mrtg.conf
----------------------------------------------------------------------------
workDir: /var/www/apache2-default/mrtg
Target[eth1]: `/var/www/apache2-default/mrtg/mrtgstats-net.sh eth1`
Title[eth1]:"Trafego na placa Internet-10Mb"
MaxBytes[eth1]: 12500
PageTop[eth1]: <h1>Trafego de dados na Intranet</h1>
Options[eth1]: growright,bits,noinfo
Target[eth0]: `/var/www/apache2-default/mrtg/mrtgstats-net.sh eth0`
Title[eth0]:"Trafego na placa Intranet-100Mb"
#MaxBytes[eth0]: 12500000
MaxBytes[eth0]: 31250
PageTop[eth0]: <h1>Trafego de dados na Intranet</h1>
Options[eth0]: growright,bits,noinfo
Target[eth2]: `/var/www/apache2-default/mrtg/mrtgstats-net.sh eth2`
Title[eth2]:"Trafego rede secundaria-1.5Mb"
MaxBytes[eth2]: 125000
PageTop[eth2]: <h1>Trafego rede secundaria</h1>
Options[eth2]: growright,bits,noinfo
Target[perf]:`/var/www/apache2-default/mrtg/mrtgstats-cpu.sh`
Title[perf]:"Carga da CPU e Uso da Memoria"
PageTop[perf]:"<h1>Carga da CPU e Uso da Memó</h1>"
Options[perf]: growright,noinfo,gauge
YLegend[perf]: Percentual
ShortLegend[perf]: %
MaxBytes[perf]: 100
Legend1[perf]: Carga da CPU
Legend2[perf]: Uso da memoria real
LegendI[perf]: Carga
LegendO[perf]: Mem
Target[disk]: `/var/www/apache2-default/mrtg/checkdisk /dev/hda2`
Options[disk]: nopercent,growright,gauge,noinfo, nobanner
MaxBytes[disk]:38000
Unscaled[disk]:dwmy
kMG[disk]:M,G,T,P
YLegend[disk]: Disco
ShortLegend[disk]: o
Kilo[disk]:1024
Legend1[disk]: Disponivel:
Legend2[disk]: Utilizado:
LegendI[disk]: Disponivel:
LegendO[disk]: Utilizado:
Title[disk]: DISCO DO LINUX
PageTop[disk]: <h1>Espaco Utilizado em
Disco</h1>fw:/var/www/apache2-default/mrtg
----------------------------------------------------------------------------
E o script que verifica a HD:
----------------------------------------------------------------------------
# cat checkdisk
#!/bin/sh
df="/bin/df"
cut="/usr/bin/cut"
grep="/bin/grep"
part=$1
line=`$df -m -x nfs| grep "$part"`
libre=`echo $line|$cut -d" " -f 4`
utilise=`echo $line|$cut -d" " -f 3`
echo $libre
echo $utilise
----------------------------------------------------------------------------
Acho que seria isto! qualquer coisa e so falar!
--
Robney C. P. Issa
"Sonho com um dia em que os homens levantar-se-ao e compreenderão,
finalmente, que são feitos para viverem como irmãos"
Matin Luther King
---------------------------------------------------------------------------
Esta lista é patrocinada pela Conectiva S.A. Visite http://www.conectiva.com.br
Arquivo: http://bazar2.conectiva.com.br/mailman/listinfo/linux-br
Regras de utilização da lista: http://linux-br.conectiva.com.br
FAQ: http://www.zago.eti.br/menu.html