I’m using RouterOS v. 4.2 and I have several queues.
What I want is to make a graph in ZABBIX to know traffic ammount say going to some subnet.
I’ve made a firewall rule marking those packets and a queue prioritizing them; but I can’t get the stats outside WinBox. I can only get stats of interfaces via SNMP.
Is there any external program that can get stats from RouterOS? I just need something like:
Depends on what you want to fetch. If you need something via SNMP, you can do an /interface print oid to get the relevant SNMP OIDs. If you need something that’s not in SNMP, here’s something else you can do.
First create a read-only user and on the system you want to fetch, create a password-less ssh-key of the DSA type.
The rest is pretty simple:
ssh -l readonlyuser 192.168.1.1 “:put [ /queue tree get myqueue packet-rate ]”
This will return the connection rate as an integer. You can modify the query to match whatever you need to monitor.