Cacti is an open-source, web-based network monitoring and graphing tool designed as a front-end application. The host template provided is used for monitoring Mikrotik devices through Cacti.
The template includes the following graphs:
* All Interfaces traffic
* Number of DHCP leases
* Total and used HDD
* Total and used Memory
* CPU Temperature Below are the steps required to setup Mikrotik, add Device to Cacti, Import template to Cacti and create graphs.
Configure SNMP on Mikrotik
Since monitoring is achieved through SNMP, we need to enable SNMP on our Mikrotik router / switch.
# Create an SNMP community string named MyNet.
# The addresses part is optional and can be omitted and can be used for additional security.
# Below, only devices that belong to 192.168.0.0/24 network can send SNMP requests.
# If we have one monitoring server we can limit this to a single IP, for ex. 192.168.0.100/32
/snmp community set [ find default=yes ] addresses=192.168.0.0/24 name=MyNet
# Trap-interfaces is the interface where our monitoring server is connected.
/snmp set contact=NetAdmin enabled=yes trap-interfaces=Internal-bridge trap-version=2
That’s it! Our Mikrotik is now ready to accept SNMP requests.
Add Mikrotik device on Cacti
Login to Cacti
Go to Devices and click Add
Enter a meaningful description for the device, for ex. “Mikrotik-Router”
On Hostname field, enter the Mikrotik IP address (ex. 192.168.0.1)
On SNMP Community enter MyNet (the string we set on our Mikrotik in the previous step)
Leave the rest as is and click create.
After a while the Status of the device should be Up. This verifies that everything we set up until now works fine!
Add Mikrotik Template to Cacti
Download the template Here (link for the file)
On Import/Export section click “Import Templates”
Click Browse, select the template file and click Open.
(Alternatively, you can copy/paste the XML code in the Import Template from Text textbox)
Click Import
Create Graphs from the provided template and start monitoring!
Click Devices
Click on the Mikrotik device we added earlier
From the Host Template dropdown menu, select Mikrotik Template
Go down-right and click Save
Go up and click Create Graphs for this Host
In the first section, select all graphs you want to monitor.
In the second section, select all interfaces you want to monitor.
On Select a graph type, make sure you select In/Out Bits (64-Bit Counters)
Click Create.
Go to Devices again and select the Mikrotik device (click the tick box on the right)
On the Choose an action dropdown menu select Place on a Tree and click Go
Select a tree if you have created one and you wish to add the device graphs there, otherwise click Continue
Now if you click on Graphs on the top, the newly added device should be there with all the graphs created.
If you wish to include additional graphs in the template, leave a comment with your request and we will do our best to update the template with the graph included.
Author: Charalambos Yiorkas
keep this work
Hi there! Such a wonderful post, thanks!
Hi,
Please provide your kind advice to monitor a bridge that created in mikrotik. Eg.
I have created a bridge name bridge1.
Under bridge1 i added ethernet2(customer1) and ethernet3(customer2).
Now i want generate a graph that monitors bridge1 seperately and customer1 seperately and customer2 seperately.
Please
link for the file to download
Thank you
What’s up to every body, it’s my first pay a visit of this web
site; this web site carries remarkable and truly fine information in favor of readers.