{{tag> cacti}} ====== Cacti 0.8.7d ====== ===== Requisitos ===== Debemos instalar los repositos de RPMForge, para instalarlo de una manera mas facil: desde binario. wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm rpm -Uhv rpmforge-release-0.3.6-1.el5.rf.i386.rpm Tambien instalamos mysql-server y las fuentes, ya que al no haber instalado Cent OS con entorno grafico no estan instaladas. Cacti las utiliza para mostrar los graficos. yum install mysql-server xorg-x11-fonts-Type1 ===== Instalacion de cacti ===== Para instalar cacti solo tendremos que hacer una llamada a yum. Este se descargara todas las librerias necesarias, servidor apache, php, rrdtool, snmpd, etc. yum install cacti net-snmp-utils ==== Sin RPMForge ==== Si por casualidad no funciona el reposito RPMForge y tenemos que instalarlo a mano, los paquetes necesarios son: httpd, snmpd, net-snmp net-snmp-utils, php, php-cli, rrdtool, net-snmp-devel, httpd-devel, php-mysql, php-common, php-gd php-mbstring, php-mcrypt, php-devel, php-xml. Y por supuesto [[http://www.cacti.net/|cacti]], que lo descomprimimos en la carpeta donde este sirviendo apache: /var/www/html. ===== Configuracion ===== ==== MySQL ==== Una vez instalado todo esto, iniciamos los servicios, le ponemos contraseña al root, creamos un usuario para cacti e importamos la base de datos que se encuentra en el directorio de instalacion de cacti. service mysqld start service httpd start service snmpd start mysqladmin -u root password 1qaz2wsx mysql -u root -p mysql> GRANT USAGE ON *.* TO 'cacti'@'localhost' IDENTIFIED BY '1qaz2wsx'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, LOCK TABLES, ALTER ON cacti.* TO 'cacti'@'localhost'; mysql> flush privileges; mysql> exit mysql cacti -u cacti -p < /var/www/cacti/cacti.sql ==== Config.php ==== Editamos el archivo config.php del directorio /include dentro de cacti. Le ponemos lo que corresponda con nuestro servidor de mysql. vim /var/www/cacti/include/config.php $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cacti"; $database_password = "1qaz2wsx"; ==== Apache ==== Por defecto solo el servidor tiene acceso a la pagina de cacti http://localhost/cacti. Para modificar esto editamos el archivo /etc/httpd/conf.d/cacti.conf y permitimos el acceso desde la LAN. vim etc/httpd/conf.d/cacti.conf Alias /cacti/ /var/www/cacti/ DirectoryIndex index.php Options -Indexes AllowOverride all order deny,allow deny from all allow from 192.168.1.0/24 AddType application/x-httpd-php .php php_flag magic_quotes_gpc on php_flag track_vars on ==== Cacti ==== Ahora solo tenemos que ir a http://ip/cacti y seguir unos pasos para finalizar la instalacion. Comprobara si tenemos todas las librerias, etc. Por defecto el usuario y contraseña seran admin. Pero te obligara a cambiarla en el primer inicio de sesion. {{ :aplicaciones:cacti1.jpg |}} ===== Ejemplos monitorización ===== Start in the Console by clicking Data Templates in the Templates section. Click Add in the top right corner and enter the values from the following screenshot. Then click Save. Afterwards create two more Data Templates based on the next two screenshots. The Data Templates tell Cacti which values (OIDs) to monitor. Next, go to Graph Templates in the Templates section. As before click Add in the top right corner and define the following two Graph Templates: Fortigate – System Resources and Fortigate – Total Sessions. The System Resources graph will monitor CPU and memory utilization in one combined graph. Next create a Host Template as per the screenshot below. Now you are ready to start monitoring firewalls. Under Management go to Devices and click Add. Define a new device. Sample values are in the screenshot. That’s it. Graphs will start to update after Cacti’s next polling cycle. === Monitorizar Fortigate === http://www.soportejm.com.sv/kb/index.php/article/fg-snmp === Monitorizar máquina Aire=== http://forums.cacti.net/post-125705.html&highlight= ===== Links ===== - http://www.victornuno.com/2008/11/18/monitorizacion-de-recursos-de-red-con-snmp-y-cacti/ - http://vpsmedia.com/articles/?p=3 - http://www.cacti.net/downloads/docs/html/unix_configure_httpd.html - https://rpmrepo.org/RPMforge/Using - http://forums.cacti.net/about12868.html - http://docs.cacti.net/manual:087:1_installation#requirements - http://www.bxtra.net/Articles/2008-09-18/Steps-how-install-Cacti-CentOS-52-DirectAdmin - http://plone.lucidsolutions.co.nz/web/management/Installing-Cacti-v0.8.7-and-Spine-v0.8.7-on-CentOS.1 - https://bugzilla.redhat.com/show_bug.cgi?id=304231 - http://forums.cacti.net/about3730-0-asc-75.html - http://docs.cacti.net/plugin:thold - http://firewallguru.blogspot.com/2008/10/monitoring-fortinet-firewalls-with.html