Hi
I'm using Mikrotik equipment and would like to record / graph users bandwidth usage based on their IP addresses. (separating local traffic from Internet traffic as I have a file share that users download from.)
I understand Mikrotik to have a tool called "Traffic-Flow" which can export traffic passing through it; but am unsure where to send this traffic / what must be done from there in order to get it into nice looking graphs.
The outcome / graphs I'm looking to create are Bandwidth usage (in / out / total) per user based on their IP address in daily / weekly / monthly intervals.
Using Linux Mint for my desktop / have installed Cacti but am not sure how to start it up. Will eventually set up a Debian Stable box specifically for the exercise.
Any help very welcome.
Thanks.
How to Record and Graph users Bandwidth per ip address
Moderators: Developers, Moderators
How to Record and Graph users Bandwidth per ip address
Last edited by jlct021 on Thu Jan 05, 2012 2:08 pm, edited 1 time in total.
Re: How to Record and Graph users Bandwidth per ip address
Roughly how many users are we talking about? And are the IPs static?
Re: How to Record and Graph users Bandwidth per ip address
roughly 10 users with Static IP's, some Wireless some LANed.
Re: How to Record and Graph users Bandwidth per ip address
I can think of 2 possible ways to do this.
The easy way.
In your Mikrotik, create 2 Mangle rules for each IP you want to monitor. One for inbound, one for outbound (one will have the source as the ip, the other will have the destination as the IP). In this rule, you will tell it to mark the packet (create a unique name for each). Then you will create some queues for each of those. Then search the forums for "mikrotik queue" and you should find some templates to graph those queues. If you want inbound and outbound on the same graph, then you will probably have to customize the templates a little bit (or create aggregates using the Aggregate Plugin).
The hard way
(I am giving basic steps, most you would have to figure out the exact steps yourself)
Have your mikrotik setup to export flow data to your cacti server. Setup flow-tools, etc... on the cacti server to collect the data. Then create a script that uses the flow-tools reporting binaries to create "Source IP" and a "Destination IP" reports. The script will then parse the reports for the appropriate IPs, and save the data off (should probably run on a cron). Then create a script in cacti to parse that saved data file for the data for the specific IP for the graph it is polling.
The easy way.
In your Mikrotik, create 2 Mangle rules for each IP you want to monitor. One for inbound, one for outbound (one will have the source as the ip, the other will have the destination as the IP). In this rule, you will tell it to mark the packet (create a unique name for each). Then you will create some queues for each of those. Then search the forums for "mikrotik queue" and you should find some templates to graph those queues. If you want inbound and outbound on the same graph, then you will probably have to customize the templates a little bit (or create aggregates using the Aggregate Plugin).
The hard way
(I am giving basic steps, most you would have to figure out the exact steps yourself)
Have your mikrotik setup to export flow data to your cacti server. Setup flow-tools, etc... on the cacti server to collect the data. Then create a script that uses the flow-tools reporting binaries to create "Source IP" and a "Destination IP" reports. The script will then parse the reports for the appropriate IPs, and save the data off (should probably run on a cron). Then create a script in cacti to parse that saved data file for the data for the specific IP for the graph it is polling.
Re: How to Record and Graph users Bandwidth per ip address
Thanks for the reply.
I like the sound of the second option but at this stage writing scrips etc is beyond my current level of know how so will explore the first option.
Is there an more automated way of achieving the second option ie the cactiEZ CD?
Ive read that using flow exports etc is much more accurate as should the router need to be rebooted, there is a very good chance of you loosing all historical data.
I like the sound of the second option but at this stage writing scrips etc is beyond my current level of know how so will explore the first option.
Is there an more automated way of achieving the second option ie the cactiEZ CD?
Ive read that using flow exports etc is much more accurate as should the router need to be rebooted, there is a very good chance of you loosing all historical data.
Who is online
Users browsing this forum: No registered users and 1 guest