Would you like to learn how to use Zabbix to monitor a Mikrotik router? In this tutorial, we are going to show you how to configure the SNMP service on Microtik and how to use Zabbix to monitor the Microtik router using SNMP.

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Zabbix Playlist:

On this page, we offer quick access to a list of videos related to Zabbix installation.

Don’t forget to subscribe to our youtube channel named FKIT.

Tutorial MikroTik – SNMP Configuration

First, we need to enable and configure the SNMP service on the Mikrotik router.

Using either the console, telnet or ssh, connect to the command-line of your mikrotik router and log in with a user who has administrative privileges.

After a successful login, the console command-line will be displayed.

Use the following command to enable the SNMP service on the MikroTik router.

Copy to Clipboard

Use the following command to list the snmp communities available on the MikroTik router.

Copy to Clipboard

As you can see, Mikrotik has a default SNMP community named PUBLIC.

The PUBLIC SNMP comminity has the ID number 0.

Use the following command to rename the PUBLIC snmp community.

Copy to Clipboard

If you wish, use the following commands to add extra SNMP communities.

Copy to Clipboard

Verify if the MicroTik router accepted the SNMP configuration.

Copy to Clipboard

Optionally, you may set a SNMP contact and a SNMP location.

Copy to Clipboard

Take a look at you SNMP configuration summary.

Copy to Clipboard

Now, let’s test the SNMP communication between the Zabbix server and the Mikrotik device.

On the Zabbix server console, use the following commands to install and test the SNMP communication.

Copy to Clipboard

In our example, the Zabbix server used the command SNMPWALK to test the communication.

In our example, the Mikrotik router has the IP address 192.168.0.200.

Congratulations! The SNMP service was configured successfully on the Mikrotik router.

Tutorial – Zabbix Configuration

Now, we need to access the Zabbix server dashboard and add the Mikrotik router as a Host.

Open your browser and enter the IP address of your web server plus /zabbix.

In our example, the following URL was entered in the Browser:

• http://35.162.85.57/zabbix

On the login screen, use the default username and default password.

• Default Username: Admin
• Default Password: zabbix

zabbix login

After a successful login, you will be sent to the Zabbix Dashboard.

zabbix dashboard

On the dashboard screen, access the Configuration menu and select the Host option.

zabbix add host

On the top right of the screen, click on the Create host button.

Zabbix Create Host

On the Host configuration screen, you will have to enter the following information:

•  Host Name – Enter a Hostname to identify the Microtik router.
• Visible Hostname – Repeat the hostname.
• New group – Enter a name to identify a group of similar devices.
• Agent Interface – Click on the Remove button.
• SNMP Interface – Click on the Add button and enter the IP address of the Mikrotik device.

Here is the original image, before our configuration.

zabbix linux - Antes

Here is the new image with our configuration.

Zabbix mikrotik monitor

Next, we need to configure the SNMP community that Zabbix will use to connect on the Mikrotik router.

Access the Macros tab on the top of the screen.

Create a macro named: {$SNMP_COMMUNITY}

The {$SNMP_COMMUNITY} macro value should be the Mikrotik SNMP community.

Zabbix SNMP Macro

In our example, the {$SNMP_COMMUNITY} value is GokuBlack

Next, we need to associate the host with a specific network monitor template.

By default, Zabbix comes with a large variety of monitoring templates.

Access the Templates tab on the top of the screen.

Click on the Select button and locate the template named: Template Net Network Generic Device SNMPv2

zabbix monitoring mikrotik

Click on the Add button (1).

Click on the Add button (2).

After a few minutes, you will be able to see the initial result on the Zabbix Dashboard.

The final result will take at least one hour.

By default, Zabbix will wait 1 hour to discover the number of interfaces available on the Mikrotik.

By default, Zabbix will wait 1 hour before collect information from the Mikrotik interfaces.

Congratulations! You have configured the Zabbix server to monitor a Mikrotik router.