MikroTik Monitoring with Cacti

MikroTik Monitoring with Cacti

This is a tool we didn’t think we needed some time ago however it has proven to us over the last few months that we have had it implemented that it is invaluable in determining the cause of network performance issues and also the date/time that services may have started being impacted. Because we deal with a lot of SMB clients we use this primarily to monitor the routers (mainly RB2011 units) that we have sitting at our client’s network edge and gives us useful information such as when someone may have started that large upload to OneDrive or Dropbox or when someone started streaming down 4K video over an ADSL link. DDoS indications from outside the network border aren’t really an issue in our scenarios.

This guide will step you through the process of installing Cacti on an existing VPS (we are using Ubuntu 16.04.2 LTS) and getting a single graph setup for your environment. This is going to assume that the VPS you are installing on has access (both via firewall and via VPN of some kind) to poll devices via SNMP.

  1. Fire up an ssh session to your VPS and start with
    ~$ sudo apt-get upgrade && sudo apt-get install apache2 php libapache2-mod-php php-mcrypt php-mysql mysql-server snmp snmpd rrdtool cacti cacti-spine
  2. Secure the MySQL server installation with
    ~$ sudo mysql_secure_installation
  3. Ensure we have snmpd running and apache2 as well with the MySQL backend we have just secured
    ~$ sudo service snmpd restart && sudo service mysql restart && sudo service apache2 restart
  4. By default your installation would have created an alias in Apache to point /cacti to your installation. So head over to http://<your_hostname>/cacti/
  5. Default user/pass is admin/admin and Cacti will force you to change the password on first login. If it doesn’t, something’s not right…
  6. Login to your MikroTik Router and ensure that SNMP is enabled. Lock it down to the IP address of your Cacti server.
    /snmp set enabled yes
    /snmp community set [ find default=yes ] addresses=IP.OF.CACTI.SERVER
  7. The welcome screen of Cacti will now step us through the three basic main steps we are going to follow, the first of which is going to be creating devices for the network. Head to Devices and then Add
  8. Type in the IP/Hostname of your router and give it a description. We are going to choose SNMP version 2 here as well to give us some more recent tools. We are also going to use a host template of a Generic SMTP-enabled Host.
  9. Once you hit ‘Create’ it will poll the device and grab some basic info. Go and head and “Create Graphs for this Host”
  10. Tick the interfaces you wish to create graphs for, select a graph type (I typically use In/Out Bits with Total Bandwidth) and then hit “Create”
  11. After this is done you can add the graphs to a ‘Graph Tree’ on the left hand management menu or you can view them in the ‘Default Tree’

And that’s all there is to a really basic Cacti installation on Ubuntu 16.04.2 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *


We'd love to hear from you.

Level 1, 191 St Georges Tce
Australia View map

Phone (WA):
08 6388 8090

Phone (NSW):
02 8234 8870

Phone (VIC):
03 9452 6930