MRTG com SNMP no Centos 5

Depois de sofre um pouco para instalar MRTG posto aqui os passos que usei para configurar.

Pacotes
yum install net-snmp net-snmp-libs net-snmp-utils mrtg.i386

Configuração do “/etc/snmp/snmpd.conf”
———————————————————————————
com2sec local localhost public
com2sec int 0.0.0.0/0 public
group MyRWGroup v1 local
group MyRWGroup v1 int
group MyRWGroup v2c local
group MyRWGroup v2c int
group MyRWGroup usm local
group MyRWGroup usm int
view all included .1 80
access MyRWGroup “” any noauth exact all all none
syslocation Curitiba, Brasil
syscontact admin
———————————————————————————-

Testando SNMP
snmpwalk -v 1 -c public xxx.xxx.xxx.xxx IP-MIB::ipAdEntIfIndex

Criar aquivos de configuração
cfgmaker –output /etc/mrtg/mrtg_temp.cfg public@xxx.xxx.xxx.xxx

Configuração Básica do “/etc/mrtg/mrtg_temp.cfg”
———————————————————————————-
EnableIPv6: no
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
icondir: /var/www/mrtg

Refresh: 300
Interval: 5
Language: portuguese
RunAsDaemon: Yes
———————————————————————————-

Criar aqrquivo Index
indexmaker –output=/var/www/mrtg/index.html /etc/mrtg/mrtg_temp.cfg

Rodar MRTG
env LANG=C mrtg /etc/mrtg/mrtg_temp.cfg