Graphing SNMP queue tree traffic in RouterOS 2.8?

Hi all,

I’m looking to use MRTG to graph the traffic from queue trees.
I can graph the interface-level traffic with no problem, but I
am not able to find MIBs for the queue trees.

Anyone have a solution to get queue tree stats via SNMP?

Just as background, we define one or more flows for a customer,
then use a queue tree to limit bandwidth. I’d like to create per-
customer graphs from the queue trees, for our own information
and to share with the client on an intranet site.

-Andrew
andrew (at) vivalibre (dot) com
La Ceiba, Honduras

I am also very interested to know what MIB’s to use for queue trees, as well as for signal level on a wireless interface.

if you do a snmpwalk, you will find out what you ask.
but, signal levels cannot be displayed with mrtg, because they contain negative values..

you should use rrdtool..

Care to give an example? snmpwalk on my miktrotik 2.8.8 box doesn’t
seem to reveal anything about my defined queue trees or ip firewall mangle flows. It reveals lots of interface stats, and not too much more.

Maybe this can help:

[admin@MikroTik HotSpot] > /queue simple print oid
Flags: X - disabled, I - invalid, D - dynamic
0 name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.1
bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.1
bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.1
packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.1
packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.1

[admin@MikroTik HotSpot] > /queue tree print oid
Flags: X - disabled, I - invalid, D - dynamic
0 name=.1.3.6.1.4.1.14988.1.1.2.2.1.2.16777228
flow=.1.3.6.1.4.1.14988.1.1.2.2.1.3.16777228
bytes=.1.3.6.1.4.1.14988.1.1.2.2.1.5.16777228
packets=.1.3.6.1.4.1.14988.1.1.2.2.1.6.16777228



I have set up mrtg for my simple queues and here's example for the first
queue:

Graphing simple queues in MikroTik router

If you have any questions email me bing@galeb.etf.bg.ac.yu

Searh and replace :

$SIMPLEQUEUENAME = Your queue name

$COMMUNITY = Your community name

$CFGNAME = Your .cfg name

$IPADDRESS = Your IP address of MikroTik router

WorkDir: c:\mrtg\queues$SIMPLEQUEUENAME

XSize[]:290
YSize[
]:250
XScale[]:3
YTics[
]:10
kilo[_]:1024

YLegend[$CFGNAME]: $SIMPLEQUEUENAME queue bits per second
Options[$CFGNAME]: growright, bits
Target[$CFGNAME]:
.1.3.6.1.4.1.14988.1.1.2.1.1.8.1&.1.3.6.1.4.1.14988.1.1.2.1.1.9.1:$COMMUNITY
@$IPADDRESS
MaxBytes[$CFGNAME]: 100000
Legend1[$CFGNAME]: Bits Recieved Per Second
Legend2[$CFGNAME]: Bits Sent Per Second
Legend3[$CFGNAME]: Maximal 5 Minute...
Legend4[$CFGNAME]: Maximal 5 Minute...
LegendI[$CFGNAME]: In:
LegendO[$CFGNAME]: Out:
Title[$CFGNAME]: $SIMPLEQUEUENAME queue bits per second
PageTop[$CFGNAME]:

$SIMPLEQUEUENAME queue bits per second


Colours[$CFGNAME]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff




I hope this can help you and give you an idea how to graph queue trees.

Ivan

I post this at 23 may 2003. on http://bruno.pmi.lv/mailman/public/routeros/2003-May/001998.html

Hi all.
I having on use already 45 days a script modified of cfgmaker of mikrotik.
The modification is the name of file for the interface of pppoe connection. Now the filename of report
is (example): the name of interface well, the filename of report is: myusername.html
the .log .png files is the same.
My knowledge of perl is very poor (like my english). The modification of cfgmaker file is brute.
You can use the last MRTG 2.10.0pre1. I use this cfgmaker file modificated for previous version of mrtg, too.
The only problem of this solution is when a user connect, then disconnect after 12 hours. The report of
this mrtg is fine, but after the disconnection if the user connect again, the report of mrtg is a line. You can
see that if you try this.

I have a cron file (scheduled tasks) with this .bat file every 5 minutes
-----file.bat —

perl cfgmaker --ifdesc=alias --noreversedns --output=test.temp public at 192.168.0.200 --global “WorkDir: c:\inetpub\usuarios”
copy first.txt+test.temp=usuarios.cfg
call perl mrtg usuarios.cfg
call perl indexmaker usuarios.cfg --title=“Usuarios Inalambricos” --enumerate --width=“450” --sort=title --output=c:\inetpub\usuarios\index.html

-------------the first.txt file -----------
Refresh: 300
Language: spanish
WriteExpires: Yes
Interval: 5
XSize[]: 350
YSize[
]: 80
MaxBytes[]: 512000
Colours[
]: LIGHT BLUE#7aafff,BLUE#1000ff,DARK BLUE#000066,VIOLET#ff00ff,DARK BLUE#000066
Background[]: #eeeeee
Options[
]: bits, integer, dorelpercent, nolegend, nobanner

the cfgmaker you can down at > http://www.ping.net.ar/mikrotik

Regards

Maximiliano Dobladez
maxi at ping.net.ar
Rio Cuarto - Argentina

I Update the script but with this cfgmaker works!

Regards
Maximiliano Dobladez

Helo, where i can find this script?

We are some issue:

  • interface-number (or OID) change every user connection
  • using cfgmaker whit option
-ifref=nr -ifdescr=name

MRTG work fine and create graphs… but after user reconnection, MRTG loose history because MRTG use interface-name in .html e .log file… and don’t match…

  • using cfgmaker whit option
-ifref=name, -ifdescr=name

MRTG/SNMP seem not able to read data; I suppose the problem is name of PPPoE interfaces, like …


A solution can be modifiy cfgmaker (when using option -ifref=nr ifdescr=name) to use interface-name (like ) as namefile of .html and .log file where MRTG store data and interface-number for target (readed by SNMP). So after user disconnect/connect MRTG will store data always in a file named like .log

cfgmaker -ifref=nr -ifdescr=name

need to retur for target line a code like:

Target[router_<pppoe-user0002>]: 15744109:public@router:

instead of:

Target[router_15744109]: 15744109:public@router:

Sorry for m poor english…