Friday, December 4, 2009

Graphing Router OS Simple Queue Using Cacti

Standard
I’ve searched the forum and the internet for tutorial on how to capture Router OS’s simple queue OID using cacti, and haven’t find any luck..
So I decided to share my really simple way, by capturing each OID manually for every entry in Simple Queue I want to graph..
Please notice that I am not an expert in whether Cacti or Mikrotik Router OS, so It will be great if you guys willing to show me/us a better way to do this..
Why cacti? why not built-in graphing tools provided by Router OS?…, for now I only have one reason –> With cacti we could gather data from spesific range of time..
This How-to assumed that you already have knowledge on installing and using cacti…
Also notice that Router OS Simple Queue OID will be dynamically changed if we delete (-) entry on our queue..
To find out the OID of the simple queue we want to graph (from the router OS)…
Code:
[tjdykb@xxx] > /queue simple pr oid
You will find entries like
Code:
Flags: X – disabled, I – invalid, D – dynamic
0 name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.54
bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.54
bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.54
packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.54
packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.54
1 name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.32
bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.32
bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.32
packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.32
packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.32
2 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
etc..
Watch the ID of the simple queue we want to graph .. the entry we use is bytes-in (download) OID and bytes-out (upload) OID..
What I did (in cacti) was made a data template (duplicated from SNMP – Generic OID Template) one for download and one for upload each, so we will have two data templates, which we will use to capture 2 different OID from one simple queue entry.. The template file link available at the end of this message … I also made a graph Template .. modified from SNMP Interface Template.. (link also available)..
Then I made data-sources for Download Traffic and Upload Traffic using the previously imported/made data-templates (say MT-SQ-down and MT-SQ-up) .. for Download Traffic put the OID bytes-in you get from the Router OS and bytes-out for Upload Traffic..
Finally we made the simple queue graph for Router OS Device, using the graph template imported/made before.. choose Download and Upload Traffic for data-sources
Wait for 10 whoe minutes ..
I know it rather stupid, but at least there is a way .. Confused
Good Luck

Links,
Data-templates :
cacti_data_template_mtsqdown_tjdykb.xml
cacti_data_template_mtsqup_tjdykb.xml
Graph-templates :
cacti_graph_template_mikrotik_simple_queue_tjdykb.xml

0 comments:

Post a Comment