Community discussions

MikroTik App
 
Svend
just joined
Topic Author
Posts: 1
Joined: Thu Jan 05, 2012 1:16 am

How do I collect and export WAN traffic data?

Thu Jan 05, 2012 1:42 am

Just wondering if there is a way to collect link utilization data from my routers and drop it into a file that I can massage with other applications?

We have about 10 links and would like to get some baselines of utilization that we can refer back to in the future. We want to scale the charts so that they all appear on the same scale and timeline and possibly overlay them. I imagine we would do this in Excel.

With Dude I can see a utilization chart for the last hour but I really want to just leave it running for about a week. Is this at all possible?

Svend
 
User avatar
geoffsmith31
Member Candidate
Member Candidate
Posts: 155
Joined: Fri Nov 05, 2010 6:08 am
Location: Toowoomba, Australia

Re: How do I collect and export WAN traffic data?

Thu Jan 05, 2012 10:08 am

I have a very similar requirement to what you are trying to do - my boss wants monthly statistics on our WAN utilisation (8 different sites). I looked at getting the data directly from Dude database and doing something in excel as well, but the data is not easily extracted. I did end up downloading a tool to open the Dude database (it is not a "usual" database system), but I couldn't make any sense of it when I finally did get at the raw data.

In the end I settled for making the graphs I wanted within The Dude and then exporting them into the report.

On the left hand panel of The Dude, there is a tree of different sections. One section is "charts". If you go into the charts section you can create whatever custom charts you want - one with all your WAN links on it, or separate charts for each WAN link. You can export these charts as images that you can put into reports, etc. There is a post somewhere here about how to automate that process. I have a link to it in an email somewhere - let me know if you can't find the post and want that bit of info.

If you do end up getting the data you want from The Dude database, I'd be very interested to find out the details of how to do that.
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: How do I collect and export WAN traffic data?

Mon Jan 09, 2012 7:24 pm

Geoffsmith31, I have not looked into this but I believe that the values stored for a particular link are actually in RRD format. If that is the case then you should be able to find where a device name matches a system_id inside the database which I believe is stored in there as XML.

To get an idea what that data would look like install the dude 3.6 on a test system, place one device and one link to your test dude. Let it run for a while then examine the XML file from 3.6 then determine if that XML is actually in RRD format by trying to import it into an RRD database. If you are able to do that then you should attempt to find the same XML structure in the database. In linux rrdtool and drraw would be instrumental in importing and displaying rrd data. Also you might find that they do store the "max" value for a link.

I suspect that you could build you own chart tool by looking at the database directly but there will be an issue where the database is single user. I don't know if the dude will run if you make database modification to be in multi-user? You could build a script that will stop then do your export and start the dude service.

I if you get that far (a dude xml/rrd exporter) it would be a very nice to expand that into an editor tool to go manually edit and fix broken databases there are many people who would be very grateful.

Anyhow this would be a big project and charts are almost good enough...

HTH,
Lebowski
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: How do I collect and export WAN traffic data?

Thu Feb 09, 2012 4:29 pm

 
noib
Member Candidate
Member Candidate
Posts: 291
Joined: Fri Jan 25, 2013 6:04 pm
Location: France
Contact:

Re: How do I collect and export WAN traffic data?

Wed Sep 11, 2013 11:55 am

As far as i understand, Dude uses SNMP to collect data; so you can also build something based on SNMP to collect what you want from the APs. It's a nice piece of work, and you will need some programming skills to achieve this.

Who is online

Users browsing this forum: No registered users and 32 guests