Community discussions

MikroTik App
 
asaddotcom
just joined
Topic Author
Posts: 12
Joined: Tue Apr 15, 2008 6:55 pm
Location: Pakistan
Contact:

How to check status of total bandwidth consumption

Mon Aug 22, 2011 12:46 pm

Is there any solution to know, how much total (previous) bandwidth each user consumed by now?
I have PPPoE users with queue limits.
The total RX,TX consumtion shows on 'Queue' till Mikrotik restarts. after rebooting the Router it shows fresh consumption .

So i want to know total RX,TX statistics from beginning to this time.

I'm using v5.6 with level 5 license

Any Idea !!!
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How to check status of total bandwidth consumption

Mon Aug 22, 2011 5:09 pm

Install a network monitoring system that queries the router on queue statistics via SNMP.
 
asaddotcom
just joined
Topic Author
Posts: 12
Joined: Tue Apr 15, 2008 6:55 pm
Location: Pakistan
Contact:

Re: How to check status of total bandwidth consumption

Mon Aug 22, 2011 7:52 pm

Install a network monitoring system that queries the router on queue statistics via SNMP.
Will you help me about this monitoring system and its implementation ?
I really don't know anything about it..

Regards
Asad
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How to check status of total bandwidth consumption

Tue Aug 23, 2011 2:42 am

You may want to look into The Dude by Mikrotik, that's a network monitoring system. There's a forum section dedicated to it. I can't help you with that, I don't use it. If you need help with a different NMS you should look for their support options, this forum is for Mikrotik products.
 
User avatar
lisandrogalup
Trainer
Trainer
Posts: 22
Joined: Thu Nov 18, 2010 4:40 pm

Re: How to check status of total bandwidth consumption

Tue Aug 23, 2011 4:53 am

What I´ll do is a simple PHP script (using the API) on my web server to fetch the data from queue each xx minutes and store it in a DB.

But what I do know is a little more complex because I don´t use (indeed I do, but I am migrating rigth now) simple queues.

I have a monitoring system (NTOP) where I receive the traffic flow (IP->Traffic-Flow) from my core router. Then I did a PHP script to collect some data from NTOP, after that I separe Local Hosts from this list and I insert the data in a MySQL database to create some graphics for my own created billing and control system. Also, every night I run a script where I count how many MB has downloaded every customer, and if this amount exceeds the monthly quota for a specific plan I insert this IP into an Address List (IP->Firewall->Address List) that is attached to a Mangle Rule and a Queue Tree for limiting the available bandwitch for this customer.

This are the API miracles that I just discovered. Also I do a lot of other things with the DHCP Server, Queues, Firewall and other things from my Billing System, included some control and stats of my Ubiquiti CPE devices.
 
asaddotcom
just joined
Topic Author
Posts: 12
Joined: Tue Apr 15, 2008 6:55 pm
Location: Pakistan
Contact:

Re: How to check status of total bandwidth consumption

Tue Aug 23, 2011 6:15 am

What I´ll do is a simple PHP script (using the API) on my web server to fetch the data from queue each xx minutes and store it in a DB.

But what I do know is a little more complex because I don´t use (indeed I do, but I am migrating rigth now) simple queues.

I have a monitoring system (NTOP) where I receive the traffic flow (IP->Traffic-Flow) from my core router. Then I did a PHP script to collect some data from NTOP, after that I separe Local Hosts from this list and I insert the data in a MySQL database to create some graphics for my own created billing and control system. Also, every night I run a script where I count how many MB has downloaded every customer, and if this amount exceeds the monthly quota for a specific plan I insert this IP into an Address List (IP->Firewall->Address List) that is attached to a Mangle Rule and a Queue Tree for limiting the available bandwitch for this customer.

This are the API miracles that I just discovered. Also I do a lot of other things with the DHCP Server, Queues, Firewall and other things from my Billing System, included some control and stats of my Ubiquiti CPE devices.
that's really nice.. would you like to share configuration and script?
 
prawira
Trainer
Trainer
Posts: 357
Joined: Fri Feb 10, 2006 5:11 am

Re: How to check status of total bandwidth consumption

Tue Aug 23, 2011 10:28 am

if you do pppoe with user manager back-end, than you will find the total upload and total download for each session.
thus, you can do monthly report with duration, total upload and total download during a month

but if you use other radius server, i believe the same data also recorded on each session.

Paul
 
User avatar
lisandrogalup
Trainer
Trainer
Posts: 22
Joined: Thu Nov 18, 2010 4:40 pm

Re: How to check status of total bandwidth consumption

Tue Aug 23, 2011 10:13 pm

that's really nice.. would you like to share configuration and script?
I have no problem, but the script is totally adapted to my Database and billing system, so there are some things that I can not post here. Tell me exaxctly what do You want to know?
if you do pppoe with user manager back-end, than you will find the total upload and total download for each session.
thus, you can do monthly report with duration, total upload and total download during a month
This is absolutely true, a PPPoE / Radius system is the easiest way to go, also you can find some useful systems like DMASoftLab Radius Manager, but I dont want to use PPPoE on my network because is 99% wireless (call me crazy but I still don´t trust in PPPoE over wireless). Also I don´t want to use Simple Queues, so I don´t have other choice.

I have this system (ntop) running by 4 days now, and I see some wrong numbers on there, so I will have to check whats foing on there (ntop)
 
dbs
just joined
Posts: 5
Joined: Sun Jul 10, 2011 1:01 am
Contact:

Re: How to check status of total bandwidth consumption

Wed Aug 24, 2011 2:47 am

Asad,

You could use Cacti for free. It's open source, uses SNMP to collect statistics, uses RRDTool to store statistics, and is written in PHP (http://www.cacti.net/).

If you want something exclusively for Mikrotik, that can also dynamically adjust your simple queues check out the Dynamic Bandwidth Shaper. See the Made for Mikrotik link here -> http://www.mikrotik.com/mfm2.php?category=3

You can try it out for free for five days.

Best,
 
User avatar
aacable
Member
Member
Posts: 435
Joined: Wed Sep 17, 2008 11:58 am
Location: ISLAMIC Republic of PAKISTAN
Contact:

Re: How to check status of total bandwidth consumption

Wed Aug 24, 2011 9:22 am

I would also like to recommend CACTI as your MRTG monitoring tool. Its really good , once you setup it properly, You will have good eyes on your network !

Try this ! ! !

http://forums.cacti.net/viewtopic.php?t=25349
 
asaddotcom
just joined
Topic Author
Posts: 12
Joined: Tue Apr 15, 2008 6:55 pm
Location: Pakistan
Contact:

Re: How to check status of total bandwidth consumption

Thu Aug 25, 2011 4:25 pm

I would also like to recommend CACTI as your MRTG monitoring tool. Its really good , once you setup it properly, You will have good eyes on your network !

Try this ! ! !

http://forums.cacti.net/viewtopic.php?t=25349
I have installed on fedora by using 'yum install cacti'

now i don't understand how to open it and configure!!
is there any web interface from where i login to?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How to check status of total bandwidth consumption

Thu Aug 25, 2011 4:45 pm

That would be a question better suited for the Cacti community. They have very friendly forums, too.

Who is online

Users browsing this forum: Amazon [Bot], homerouter, maciejl and 78 guests