-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to ask that I have turned off fast traffic, but I still can’t record traffic #5
Comments
I think you need to turn Accounting on as well |
Python cannot parse and process normally, I am sure all ros have normal output |
What do you mean "Python cannot parse and process normally"? Are there any errors in console? I never said they have different output, but you do need to disable Fast Track, enable Accounting, enable Web Access to Accounting and type the IP of the PC where you run TrafficMonitor on, otherwise ROS will block it from access. |
I will show you a screenshot later |
Sorry, not sure what's wrong? It only shows local clients in LAN, which is what it's for. |
All of my network is running nat, I want to check the usage of each area IP
Nixellion ***@***.***> 於 2021年5月11日 週二 上午6:22 寫道:
… Sorry, not sure what's wrong?
It only shows local clients in LAN, which is what it's for.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADV2U5SGAUA7YNBC62QKRDLTNBMDFANCNFSM44P66M7Q>
.
|
Well, in it's current state this project only supports single subnet based on router's IP. I developed it for simple use at home environment where it's unlikely you would have that many networks or extra NAT rules. The key here is that the data mask of Mirkotik's accounting is You can see the relevant code in this file and try updating or changing it to adapt to your needs: https://github.com/Nixellion/MikrotikTrafficMonitor/blob/master/collector.py All the code responsible for getting and parsing data from mirkotik's accounting table is in this file. So instead of using these checks: if src.startswith(self.local_network): # upload
k = src
elif dst.startswith(self.local_network): You may replace it with: if ".".join(src.strip().split('.')[0:-1]) in self.local_networks: # upload
k = src
elif ".".join(dst.strip().split('.')[0:-1]) in self.local_networks: And also on line 17 you'd need to replace or add below a new variable:
Something like that would work. Sadly I don't have the time to actively maintain this project and implement these updates myself, it outlived it's usefulness for me, but that's why I made it open source, so anyone can pick it up and improve on it as needed. |
Thanks
Nixellion ***@***.***> 於 2021年5月11日 週二 下午4:56 寫道:
… Well, in it's current state this project only supports single subnet based
on router's IP. I developed it for simple use at home environment where
it's unlikely you would have that many networks or extra NAT rules.
The key here is that the data mask of Mirkotik's accounting is source ip,
destination ip, x, x, x, x and it lists all connections as they were
initiated or something like that, meaning that source ip is not
necessarily your local one. So it has to be filtered.
You can see the relevant code in this file and try updating or changing it
to adapt to your needs:
https://github.com/Nixellion/MikrotikTrafficMonitor/blob/master/collector.py
All the code responsible for getting and parsing data from mirkotik's
accounting table is in this file.
So instead of using these checks:
if src.startswith(self.local_network): # upload
k = srcelif dst.startswith(self.local_network):
You may replace it with:
if ".".join(src.strip().split('.')[0:-1]) in self.local_networks: # upload
k = srcelif ".".join(dst.strip().split('.')[0:-1]) in self.local_networks:
And also on line 17 you'd need to replace or add below a new variable:
self.local_networks = ["192.168.1.", "192.168.2."] # List any subnet parts you'd like to track
Something like that would work.
Sadly I don't have the time to actively maintain this project and
implement these updates myself, it outlived it's usefulness for me, but
that's why I made it open source, so anyone can pick it up and improve on
it as needed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADV2U5QAIKVXU74BJRPKYV3TNDWK5ANCNFSM44P66M7Q>
.
|
I want to ask that I have turned off fast traffic, but I still can’t record traffic
The text was updated successfully, but these errors were encountered: