Community discussions

MikroTik App
 
tw0face
just joined
Topic Author
Posts: 5
Joined: Tue Nov 01, 2022 4:18 pm

traffic usage counters

Tue Nov 01, 2022 5:52 pm

Hello,

i would like to ask for your help with my task
i'm using RB2011UiAS-2HnD and i wanted to add simple counters to monitor traffic usage (e.g. downloaded GB per month)
i dont need any fancy graphs, just the value
similar to the default dummy rules visible for example in ip/firewall/filter rules or mangle or raw etc. in the web view

i tried to add passthrough rules on various chains in various places (mangle, raw, filter rules ...),
but they were increasing MUCH less than the dummy counters, so i guess i must be doing something wrong

i wanted to have a separate counter for daily/monthly upload and download (sum of all ports, i.e. for the whole router)
i guess the daily/monthly would be the same counter and with the help of scheduler i will be reseting them at different times

anybody can guide me how to configure such counters please? thanks in advance
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: traffic usage counters

Wed Nov 02, 2022 5:10 am

Dummy rules are for FastTrack. But when it's active, packets bypass firewall, including your passthrough rules.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Wed Nov 02, 2022 4:30 pm

You can use the counters on the interface, e.g. when all your traffic enters via ether1 you watch the counters for ether1.
This can be done via SNMP.
 
tw0face
just joined
Topic Author
Posts: 5
Joined: Tue Nov 01, 2022 4:18 pm

Re: traffic usage counters

Thu Nov 03, 2022 10:25 pm

thank you for your answers,
but i still do not know how or even if it is possible to do what i want

i was only referring the dummy rules (fasttrack) because they seem to contain the data i want
so i was wondering if it is possible to create similar rules that would also have the same data (i.e. byte counter)

regarding the snmp, i do not want to install any extra software to collect and store those data
i only want to check the traffic usage from time to time when i login via web interface

is it possible to have such counters visible using the web interface?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Thu Nov 03, 2022 10:30 pm

Yes, the interface counters are also in the web interface.
But remember that when you do not retrieve them regularly, and the router gets powered off or rebooted, your counts are lost.
That is why it is more prudent to use some automated method to retrieve them at some interval, e.g. an hour or a day.
 
tw0face
just joined
Topic Author
Posts: 5
Joined: Tue Nov 01, 2022 4:18 pm

Re: traffic usage counters

Thu Nov 03, 2022 10:44 pm

i know i can see the interface counters
but i dont know how to use that to see daily and monthly traffic usage in the web interface (the amount of GB downloaded and uploaded)

the router is rebooted very rarely and if it does and the counts are lost, i can live with occasional wrong values
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Thu Nov 03, 2022 11:35 pm

You will have to note down the counts regularly to see how much they changed relative to the previous time you checked.
So e.g. check once a day and then subtract what you noted down the previous day to see how much you used that day.
 
tw0face
just joined
Topic Author
Posts: 5
Joined: Tue Nov 01, 2022 4:18 pm

Re: traffic usage counters

Fri Nov 04, 2022 8:45 am

is it possible to automate this process using scripts on the device itself?
and then have the resulting values be visible also on the device itself? (ideally in the web interface)
if yes, could you please point me in the right direction how to do that, please?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Fri Nov 04, 2022 10:16 am

It should be possible to script that, but you need skills in general programming and learn the scripting language.
(I mean the keeping of the numbers. presenting them via the web interface will not be possible)
Debugging RouterOS scripts is a difficult task, especially such scheduled scripts that require background storage.
Maybe someone else will do it for you! (not me)
 
jult
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Sat Dec 26, 2020 1:16 am

Re: traffic usage counters

Thu Aug 24, 2023 11:30 pm

Shocking that such basic functionality is missing for the Graphing tool or web-interface. Really.
It's the most important value these days. Speeds are of no value. Total usage data (i.e. GB/day, GB/month) is what people pay for in every stage of the internet connectivity.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Thu Aug 24, 2023 11:34 pm

Well that will probably vary by region. Here we have flat-rate internet, no charge for traffic.
 
jult
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Sat Dec 26, 2020 1:16 am

Re: traffic usage counters

Fri Aug 25, 2023 11:35 am

Well that will probably vary by region. Here we have flat-rate internet, no charge for traffic.
Yeah, "flat rate", wait until you go past your assumed or expected 'fair use'. No such thing as free/unlimited data traffic. I have yet to find any connectivity provider that doesn't charge beyond a certain threshold.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Fri Aug 25, 2023 1:49 pm

Of course, but that is not something I as a normal user am going to hit and for which I would need to do bookkeeping.
When I have exceeded that limit I will get a letter.
(this is for fixed connections, for mobile it is different and there are defined limits above which you will get a very low speed)
 
jult
Frequent Visitor
Frequent Visitor
Posts: 52
Joined: Sat Dec 26, 2020 1:16 am

Re: traffic usage counters

Thu Dec 28, 2023 12:56 pm

Of course, but that is not something I as a normal user am going to hit and for which I would need to do bookkeeping.
When I have exceeded that limit I will get a letter.
(this is for fixed connections, for mobile it is different and there are defined limits above which you will get a very low speed)
Still, even with fixed connections there's no unlimited traffic, and I disagree; In this day and age it's not difficult to go over those 'invisible' limits. All you need is a couple of gamers/8k/VR-users maxing out the available bandwidth on their 10Gbe LAN connections for a couple of days in a row and you're there.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10223
Joined: Mon Jun 08, 2015 12:09 pm

Re: traffic usage counters

Thu Dec 28, 2023 2:04 pm

In the past month (coincidentally my router is up for a month) I have used 1468GB of traffic.
But that has not caused me to hit the "invisible limit".

Who is online

Users browsing this forum: mates, smirgo and 106 guests