Mikrotik and Zabbix SNMP based on interface name

Hello. I have 4 mikrotiks with SNMP.
I’ve got Zabbix server and it’s get data of WAN port traffic usage on mikrotiks.

I use .1.3.6.1.2.1.2.2.1.10.1 and .1.3.6.1.2.1.2.2.1.16.1 OID’s ( ifInOctets1 and ifOutOctets1)
But I have a little problem with zabbix templates.
All mikrotik configurations is different and OID’s different too.

For example:
Mikrotik_1 have 1.3.6.1.2.1.2.2.1.10.15 OID on WAN port
Mikrotik_2 have 1.3.6.1.2.1.2.2.1.10.1 OID on WAN port
Mikrotik_3 have 1.3.6.1.2.1.2.2.1.10.11 on for WAN port
Mikrotik_4 have 1.3.6.1.2.1.2.2.1.10.4 on for WAN port

So I need to manually configure it on Zabbix when I’m add new mikrotik.
First I need to find - what OID have WAN interface? It’s same every time.
But all mikrotiks have same title of ether1 port. I’m renamed it to “WAN”.

So my question is.
I need single template for all mikrotiks, because I can’t change OID on mikrotik.
Is there possibility to get ifIn/OutOctets in zabbix based on interface name?

For example:
Mikrotik_4 have 1.3.6.1.2.1.2.2.1.10.4 OID for WAN port. They I’m add it in zabbix.
Zabbix get interface name value “WAN” and then match it to 1.3.6.1.2.1.2.2.1.10.4 OID and I get my graphs.

Thanks and sorry for bad english.

AFAIK last number in these OIDs is physical interface number,
so ‘ether-1’ is .1.3.6.1.2.1.2.2.1.10.1 and so on.
Maybe your WAN interface on other RouterBoards is not configured on ‘ether-1’ hence differences.

HTH,

Yeah.. thats the problem.
Sometimes I configured mikrotik with import configuration from previous mikrotik and physical interfaces mess up. So i have to rename it and then ether-1 can have different numbers and the end.

The Zabbix default “Template SNMP Device” does just that, looking up interface names from the ifDescr table so you don’t need to worry about the SNMP indexes. It also automatically discovers all of your interfaces and monitors them.

I’m tried to add The Zabbix default “Template SNMP Device”.
But where can i find which of interfaces is called ‘WAN’ and make graph.
In Zabbix I see interfaces like this:

Template_SNMPv2_Device:ifDescr
Template_SNMPv2_Device:ifDescr2
Template_SNMPv2_Device:ifDescr3

There is no values.

Sorry for bumping old thread, but better then to open a new one as i want to know what i need to include in host and where to have traffic flow monitoring on zabbix ?