What's new

uiDivStats uiDivStats - WebUI for Diversion statistics

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Think uiDivStats gets the stats from Diversion so guess you could exclude the client with DNSFilter
(You could use a Ad-block DNS server in DNSFilter for that client)
Yeah I suppose that's one way to do it... would prefer to obviously still send it back to dnsmasq locally and just exclude its stats being compiled, but probably not a feature at the moment.

EDIT: What about enabling "Alternate blocking list" in Diversion; how does uiDivStats handle stats when the user has Alternate blocking list enabled?

EDIT2: No dice. It takes the combined list results! Had to try it at least...
 
Last edited:
Yeah I suppose that's one way to do it... would prefer to obviously still send it back to dnsmasq locally and just exclude its stats being compiled, but probably not a feature at the moment.

EDIT: What about enabling "Alternate blocking list" in Diversion; how does uiDivStats handle stats when the user has Alternate blocking list enabled?

EDIT2: No dice. It takes the combined list results! Had to try it at least...
uiDivStats uses its own code to generate the stats, it is lifted off of Diversions stats function with some specific modifications. I usually post a pull request to @Jack Yaz for changes to take affect in uiDivStats if I do changes in Diversion affecting the stats. Hence why I usually correct errors or improvements for the generating function.

Sadly, suppressing an IP address in the stats generation looks not to be simple. This code is years old (early days of AB-Solution) and I'm afraid to break things.
I'll have a go at it anyway, no promises though.
 
uiDivStats uses its own code to generate the stats, it is lifted off of Diversions stats function with some specific modifications. I usually post a pull request to @Jack Yaz for changes to take affect in uiDivStats if I do changes in Diversion affecting the stats. Hence why I usually correct errors or improvements for the generating function.

Sadly, suppressing an IP address in the stats generation looks not to be simple. This code is years old (early days of AB-Solution) and I'm afraid to break things.
I'll have a go at it anyway, no promises though.
If I'd got round to looking into parsing dnsmasq logging into a SQLite db it would be trivial :(

I'm moving again though so will be out of action for a bit
 
If I'd got round to looking into parsing dnsmasq logging into a SQLite db it would be trivial :(

I'm moving again though so will be out of action for a bit
I've found a crude way to filter out clients by IP for the stats. I would expect the exclusion IP address to be in the manually assigned IP list, correct @HairyA00 ?
 
I've found a crude way to filter out clients by IP for the stats. I would expect the exclusion IP address to be in the manually assigned IP list, correct @HairyA00 ?

Yeah, I have one client that is my work computer that sends an obscene amount of queries home. To the point where I never even bothered looking at stats. It was just a suggestion, don't go crazy if the solution is crude or annoying to implement. My "workaround" was to just send this laptop upstream to Quad9 via DNSFilter (albeit, it is no longer sinkholed), but I am an admin and can presumably manually modify my Windows hosts file.

But yes, the exclusion IP would be in the manually assigned IP list.
 
I got a heap of this in when Diversion came up after install and then exiting Diversion. I hope this is ok

/opt/bin/grep: /opt/var/log/dnsmasq.log2: No such file or directory
 
I got a heap of this in when Diversion came up after install and then exiting Diversion. I hope this is ok

/opt/bin/grep: /opt/var/log/dnsmasq.log2: No such file or directory
No problem, it'll fix itself. Are you running Diversion 4.1.4 and uiDivStats 1.2.2?
 
Fresh install using the latest scripts downloaded today, so should all be the latest. Now I just need to work out how to capture reporting for my mobile phone data when VPN'd in through my home network.
 
Thanks for all your hard work.

I notice my CPU is running hot, with diversion "count_ads" showing up in htop as the main CPU load. Does it calm down eventually or could something be wrong?


Thanks yes VPN ad-blocking seems to be working. I also mean how to capture VPN clients in reporting i.e. Diversion and traffic statistics. VPN client traffic doesn't seem to be captured (for reporting) anywhere, probably due to being on a different subnet or something.
 
Last edited:
I notice my CPU is running hot, with diversion "count_ads" showing up in htop as the main CPU load. Does it calm down eventually or could something be wrong?
What is the filesize of the dnsmasq.log file?
Check with
Code:
ls -lh /opt/var/log
 
I notice my CPU is running hot, with diversion "count_ads" showing up in htop as the main CPU load. Does it calm down eventually or could something be wrong?
The next Diversion release will have a much better and quicker way of counting the ads and use a fraction of the CPU cycles.
 
I see google at the top of the list by a massive margin, but I never see it in the diversion realtime log, and I never use the website, so where is this happening? A week or so ago I did manually deleting stats under /opt/share/diversion/stats to try and reset the stats, which removed client individuality in your program, even to this day, but not the stats apparently... not sure if these represent long term or short terms states, everything but google seems to be changing over time

google-what.png
 
Last edited:
I see google at the top of the list by a massive margin, but I never see it in the diversion realtime log, and I never use the website, so where is this happening? A week or so ago I did manually deleting stats under /opt/share/diversion/stats to try and reset the stats, which removed client individuality in your program, even to this day, but not the stats apparently... not sure if these represent long term or short terms states, everything but google seems to be changing over time
You deleted the compiled stats you opted to save in the /stats/ directory. And the IP-Client name resolution file with it that both Diversion and uiDivStats use.

The statistics itself are compiled from the Dnsmasq log files which are reset weekly with the blocking file update.
There's an option in d to reset the Dnsmasq log files in Diversion which exactly does what you wanted to do..
 
You deleted the compiled stats you opted to save in the /stats/ directory. And the IP-Client name resolution file with it that both Diversion and uiDivStats use.

The statistics itself are compiled from the Dnsmasq log files which are reset weekly with the blocking file update.
There's an option in d to reset the Dnsmasq log files in Diversion which exactly does what you wanted to do..

can you add the ability for uidivstats to parse for lan blocking IP servstats page?
upload_2019-12-3_14-3-21.png
 
Hm, this should work already.
What does the below show?
Code:
grep psIP /opt/share/diversion/.conf/diversion.conf
it list the ip address of the pixelserv I used locally before switching to lanblockingIP

if

psState=off

it could use
Code:
grep lanBIP /opt/share/diversion/.conf/
diversion.conf

I will just manually edit this address to the IP address of lanblocking for now though. I remember it once working before though without an issue which is odd.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top