Pages

Tuesday, December 4, 2012

Installing Cacti in Debian 6

Recently I needed to monitor a network segment of a client's network. They were relatively small but were having over utilization issues. Using Cacti, which is a free Linux based SNMP monitoring/graphing program I was able to track network performance metrics such as bandwidth and throughput of switches and firewalls. When used in conjunction with vCenter performance graphing it shouldn't take long to pinpoint issues you are experiencing. This tool requires SNMP to be configured per device and then pointed at the Cacti server to start tracking and logging the various metrics. Below is a quick tutorial for setting up a Cacti server.

Note: You will not need to download Cacti separately or in advance but for the purpose of learning more about Cacti below is the link the developer’s website.

http://www.cacti.net

Hardware specs used
To install Cacti you will need either a physical computer or a VM. We will be installing our Cacti server into a VMware VM. For the Debian install I created a VM with 2 sockets and 1 core, 1 GB of memory, and a 40 GB hard drive.

Installing Debian 6.0.6
The link to the Debian download can be found below. You will need the Debian amd64 ISO. When you select the download ignore the reference to "amd", it is what Debian calls their general 64 bit OS release. As of 11/27 the name of the latest DVD you need is debian-6.0.6-amd64-DVD-1.iso. Install Debian like you would any operating system with the only exception being enable network mirrors during the installation. Shortly after partitioning the disk you will be asked if you want to use a network mirror for additional repositories. Ensure you select use a network mirror during the install, and point it to one of the many Debian depositories available in the list provided. I selected the first in the list. Failing to do this step will prevent you from installing Cacti the easy way later on. The last step of setting up your Debian VM is to setup a static IP and then you are ready to move on.
 
Debian 6.0.6 amd64
 
Installing VMware tools
Once you get to the desktop you need to install a few Linux components that are not installed by default and then the VMware tools for Linux. You can find the link to install the Linux components and VMware Tools for Linux on Debian HERE.

Installing Cacti
For the Cacti install if you added the network repositories as recommended you will simply need to open one last root terminal and run the command apt-get install cacti and hit enter. You will be prompted to create a MySQL password, and when asked what web server you should use select Apache2. Follow the remaining prompts and supply the required passwords you used to setup the OS and the installation of Cacti should complete shortly. Once the Cacti install finishes, open a web browser, and point it to http://IP ADDRESS/cacti/. You will be asked a few basic questions, which is again as simple as next, next, and next. If all went as according to plan, you should now be seeing a login screen. The default login is admin for the username, and admin for the password. Upon first login you will be required to change your password. You are now ready to add SNMP devices and servers to be monitored, and graphed.