Through this hands-on you will install cacti monitoring system and create device entry for your workshop router and switch. You will also create graphs and arrange a graph hierarchy. Finally you will install some cacti plug-ins.


You can easily install cacti by following

# apt-get install cacti
  • While the installation process you will be ask for a password for mysql server. Please give the <class password>.
  • Select Apache2 as the webserver type
  • Select Yes to Configure database for cacti with dbconfig-common?
  • Again give the <class password> for the database administrative user.
  • You have complete the cacti installation. open a web browser in your host PC and give the following url.

http://<Your VM's IP Address>/cacti

  • Click next
  • Select New Install and click next
  • Click Finish and you will be directed to the cacti login page
  • Use default username and password to login

User name : admin

Password : admin

  • Now you have logged in to cacti monitoring system.

small modification

In your default installation mysql server runs in strict mode. let's disable it.

Create the following file

sudo vi /etc/mysql/conf.d/disable_strict_mode.cnf

Add the following line


Restart the service

sudo service mysql restart


Change admin password

  • First click to Console tab. Then click on User Management on the left side bar.
  • In the User Management page click on the user name admin.
  • In the password text box give the <class password> and click Save.

Cacti Graphs

  • Click the Graphs tab. You will see Default Tree Icon on the side bar.
  • expand it click on the localhost icon. You will see some graphs. (Might not have any values as it take time to generate values)
  • These graphs will show the values of your VM.

Adding Devices

Now let's add some other devices to the system. We will add the workshop switch and the workshop router.

  • Go to Console and click the Devices.
  • Click Add on the devices page. Now you can add the workshop router and the work shop switch and you will be directed to the add devices page. First add the Workshop Switch
  • Give following settings

description : workshp_sw

Hostname :

Host Template : Generic SNMP-enabled Host

Number of Collection Threads : 1

Downed Device Detection : Ping

Ping Method : ICMP Ping

SNMP Version : version 2

SNMP Community : NetMon2017

  • Click Create and then click Save

  • You can add the workshop router as with the same settings with the correct IP address

Creating Graphs

Now that we have add devices let's create some graphs so we can monitor our devices.

  • Go to Console and click the New Graphs.
  • Select workshp_sw and it will show you all the available graphs. Also you can create new graphs from graphs template.
  • To create a graph to measure ping latency select Unix-Ping Latency in the graph templates window. and click Create
  • Keep the default legend color and value and click create
  • Lets create graphs to measure the Network interfaces of the switch. To do that select the Network interfaces in the SNMP - Interface Statistics and click Create
  • You can do the same and create graphs for the workshop router

Managing Graphs Trees

Now let's create graph trees. So we can view the graphs in the graph section.

  • Go to Console and click the Graph Trees.
  • Click Add and give Network devices. Keep the parent item as [root]
  • Click Create.
  • Add another two trees. One for the workshop Router (ws_rtr) and another for workshop switch(ws_sw). Keep the parent item of these created trees as [Network Devices]

Adding Graphs to the graph tree

Let's add the graphs of sorkshop switch and workshop router to their graph trees.

  • Go to Console and click the Graph Management.
  • Select workshp_sw from the host drop down menu.
  • You will see all the graphs from the workshop switch select them all and select Place on a Tree from the choose an action drop down menu.
  • Click Go and select ws_sw from the Destination Branch: drop down menu.
  • click Continue
  • Do the same to the workshop router.
  • Go to Graphs and check whether you can monitor the devices.

Cacti Plugins

Cacti monitoring system have plenty of plugins available. You can download and install them. Let install the threshold plugin

  • Go to /usr/share/cacti/site/plugins
  • To install threshold or thold pluging you also need the setting plugin to be install. Lets install both. First download the plugins
    sudo wget
    sudo wget
  • Extract the files
    sudo tar -zxvf settings.tar.gz
    sudo tar -zxvf thold.tar.gz
  • Now go to cacti web interface and go to Console and click Plugin Management
  • You will see the downloaded plugins. Install both plugins by clicking the blue arrow icon. and enable the plugin by clicking the green arrow icon.
  • You have successfully install the thold plugin.
  • Now let's create a threshold. Go to Console and click Settings

In the workshop we will not set up e-mail notification. Therefore skip next two steps.

  • Go to DNS/Mail tab and set up the mail function details.
  • Then go to Threshold tab and set up the e-mail function details. and click save.
  • Now you can add a threshold. To do that go to Console and click Threshold.
  • Let's Create a threshold to notify an alarm when the ping latency of the workshop router goes above 1ms. To do that click add
  • Select the router from the host drop down box. Then select ping latency from the graph drop down list and finally select ping form the data select drop down list.
  • Click Create
  • Set the Warning High Threshold as 2ms and set the Alert high threshold as 1ms. Click save
  • Now you have add a threshold. But this might not show as you skipped the e mail set up.
Last modified 5 years ago Last modified on Nov 28, 2017, 11:55:00 AM