Cacti provides an exceptionally easy to use system monitoring solution. Essential graphs are included by default, such as load average and memory usage. For additional graphs, download templates from Cacti’s website/forum or create your own.

This tutorial assumes MySQL and Nginx have been installed.

Step 1 – Install SNMPD

sudo apt-get install snmpd 1 sudo apt-get install snmpd

Step 2 – Configure SNMPD

Edit /etc/default/snmpd, find the following line:

#export MIBS=/usr/share/mibs/netsnmp/ 1 #export MIBS=/usr/share/mibs/netsnmp/

Replace it with:

export MIBS=ALL 1 export MIBS=ALL

Then add the following line to the ACCESS CONTROL area of /etc/snmp/snmpd.conf:

rocommunity public localhost # Full access from localhost 1 rocommunity public localhost # Full access from localhost

Step 3 – Download non-free MIB files

sudo apt-get install snmp-mibs-downloader sudo service snmpd restart # Reload new configuration and MIB files 1 2 3 sudo apt-get install snmp-mibs-downloader sudo service snmpd restart # Reload new configuration and MIB files

Step 4 – Install Cacti and Spine (Cacti poller)

sudo apt-get install cacti cacti-spine 1 sudo apt-get install cacti cacti-spine

During the installation of Cacti, you will be asked if you’d like dbconfig-common to setup MySQL for Cacti automatically. This creates a user and database for Cacti, and then imports the necessary data. If dbconfig-common is unable to configure the database, or you decline to use it, visit this guide for help setting up MySQL on your own.

Step 5 – Add a symbolic link to Cacti’s web interface

Choose a location to access Cacti from, such as /cacti or /stats and create a symbolic link with that name.

cd /srv/www/notblog.org/public_html ln -s /usr/share/cacti/site cacti sudo chown -R www-data:www-data /usr/share/cacti/site 1 2 3 4 5 cd /srv/www/notblog.org/public_html ln -s /usr/share/cacti/site cacti sudo chown -R www-data:www-data /usr/share/cacti/site

Line 1 : Change directory to the root of our site

Line 2 : Create a symbolic link to Cacti’s web interface named cacti

Line 3: Optional Change owner and group of Cacti’s web interface to www-data



Step 6 – Finish configuration via Cacti’s web interface

Visit your Cacti installation with your browser of choice. Log in to the default administrator account:

Username : admin

Password: admin

Click Settings in the menu on the left. Verify each page of settings are correct, then visit this guide for more information on creating your first graphs.