Publicado el 10 de Abril del 2018
375 visualizaciones desde el 10 de Abril del 2018
4,7 KB
2 paginas
Creado hace 15a (05/03/2009)
Tabla de Contenidos
•
MRTG en CentOS 5
Configuración de SNMP
Configuración de MRTG
MRTG en CentOS 5
Instalar los paquetes de SNMP y MRTG:
yum install net-snmp-utils net-snmp mrtg
Configuración de SNMP
Subir el servicio SNMP:
service snmpd start
chkconfig snmpd on
Chequear comunicación con el servidor SNMP:
snmpwalk -v 1 -c public localhost
Configuración del servidor SNMP: se debe configurar el archivo /etc/snmp/snmpd.conf
Encontrar ls siguiente línea:
com2sec notConfigUser default public
Reemplazarla con las siguientes líneas:
com2sec local localhost public
com2sec mynetwork 192.168.0.0/24 public
Baje un poco en el archivo, y encuentre las líneas:
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
Reemplácelas con:
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
Baje un poco en el archivo, y encuentre las líneas:
view systemview included system
Reemplácela por:
1/2
view all included .1 80
Baje un poco en el archivo, y encuentre las líneas:
access notConfigGroup "" any noauth exact systemview none none
Reemplácela por:
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
Baje un poco en el archivo, y encuentre las líneas:
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
Reemplácela por:
syslocation Linux (CentOS 5), Linux Server.
syscontact IT Linux Ltda. <none@it-linux>
Reiniciar el servicio:
service snmpd restart
Revisar nuevamente:
snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
Configuración de MRTG
Generar el archivo de configuración:
cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg/mrtg.cfg
public@localhost
Crear el índice:
indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
Revisar que el MRTG esté corriendo desde el CRON:
cat /etc/cron.d/mrtg
Debe contener:
/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg ?lock-file /var/lock/mrtg/mrtg_l
?confcache-file /var/lib/mrtg/mrtg.ok
Fuente: http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg///
2/2
Comentarios de: MRTG en CentOS 5 (0)
No hay comentarios