Mostrando las entradas con la etiqueta mrtg. Mostrar todas las entradas
Mostrando las entradas con la etiqueta mrtg. Mostrar todas las entradas

viernes, 25 de diciembre de 2009

MRTG en Debian Lenny

Instalando MRTG (The Multi Router Traffic Graphic)

Previamente se debe tener el snmp habilitado

#apt-get update
#apt-get install snmp

editamos el archivo snmpd.conf

#nano /etc/snmp/snmpd.conf

#com2sec paranoid default public <-- comentamos esta linea
com2sec readonly default public <--- descomentamos la linea

reiniciamos el servicio

#/etc/init.d/snmpd restart

Empezamos con el mrtg

#apt-get install mrtg

Creamos la carpeta
#mkdir /var/www/mrtg

Luego ejecutamos lo suguiente

#cfgmaker --global 'WorkDir: /var/www/mrtg' --output /etc/mrtg.cfg public@127.0.0.1

y el creador del index

#indexmaker /etc/mrtg.cfg --columns=1 --output /var/www/mrtg/index.html

ejecutamos el comando

#mrtg

x64:~# mrtg
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case. Try the following command to start:

env LANG=C /usr/bin/mrtg
-----------------------------------------------------------------------
Hacemos lo indicado (ahora si, salen una serie de warnings)

x64:~# env LANG=C /usr/bin/mrtg

Salen una serie de warnings luego habra que colocar en el crontab esto:

#crontab -e

# m h dom mon dow command
*/5 * * * * mrtg

Esperamos y va saliendo esto



Fuente:

http://www.debian-administration.org/articles/366
http://oss.oetiker.ch/mrtg/index.en.html