This how to shows how to install and setup CACTI. CACTI is a monitoring tool that displays trends in the form of graphics. It can display trends for network, CPU, memory, disk activity.
Step 1) Install required packages. -Install apache, php, mysql, snmp
yum install httpd httpd-devel mysql mysql-server php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-mysql php-snmp net-snmp-utils p net-snmp-libs php-pear-Net-SMTP rrdtool
– Install EPEL repo in order to install CACTI
rpm -ivh epel-release-6-8.noarch.rpm
yum install cacti
Step 2) Configure MySQL database. -Setup Password, create/import the CACTI database tables
– Setup password on MySQL database
mysqladmin -u root password Enter_Your_Password_Here
– Create the CACTI database and user.
mysql -u root -p
mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'your-password-here';
mysql> FLUSH privileges;
– Import the CACTI tables to your newly create database.
mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8a/cacti.sql
Step 3) Prepare Apache for the CACTI installation. -Edit the following file and enter the lines below. Your network will be different.
Alias /cacti /usr/share/cacti
Deny from all
Allow from 10.0.0.0/26
service httpd restart
Step 4) Setup SNMP on the CACTI server and on your client.
- On the server and on the client clear the file of the current settings and enter the following lines. Pay attention to the "community" parameter. I called mine "mylan".
# A user 'myUser' is being defined with the community string 'myCommunity' and source network 10.0.0.0/26
com2sec myUser 10.0.0.0/26 mylan
# myUser is added into the group 'myGroup' and the permission of the group is defined
group myGroup v1 myUser
group myGroup v2c myUser
view all included .1
access myGroup "" any noauth exact all all none
service snmpd restart
Step 5) Start the CACTI installation. - Enable cronjobs and start the web based installation.
- Enable the following cronjob under root.
*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1
Step 5) Run the web installer of CACTI.
Point your browser to your cacti server. In my case will be http://10.0.0.14/cacti
- Select New Install
- The following page will do a check for binaries/libraries it requires. Make sure everything comes back as green.
- Enter the default username/password. The default login is admin and the default password is admin. You will be prompted to change your password.
Step 6) Add a remote server to monitor.
- Select the "Devices" link and press Select "Add"
Below is a sample of my setup.
- Define types of queries you want CACTI to perform on your remote server.Add the following items and then select "Create new Graph for this host