Summarise the permitted or blocked domains on the dashboard according to the second-level domain that they come from - maybe also allow compiling the data according to linked domains.
For example all
push.prod.netflix.com
api-global.netflix.com
are my top two domains, they would be listed as simply
netflix.com (+)
or some other indication instead of "(+)" that it was a compilation of subdomains.
The additional suggestion is that
occ-0-1167-299.1.nflxso.net
and other such domains used by netflix could be folded in to that so one would get a list by "origin" of the domains rather than a breakout (initially) of all the separate subdomains.
I am also interested in this.
A similar FR received a negative answer from a developer, but I disagree with his arguments: 2nd level domains generally gather all traffic by a single business entity. Domains not following that pattern are the exceptions (website hosters, .uk, .arpa, etc…).
Merging multiple 2nd levels by company is less important, as there are not as many as subdomains and they indicate different major activities in that company (e.g. Google).
As a workaround, what I am aiming for can be achieved by an SQLite query:
SELECT
count(1),
-- only down to the 2nd level domain, e.g. "wikipedia.org"
CASE WHEN instr(domain, '.') = 0 OR instr(subdom, '.') = 0 THEN domain -- two levels or less
ELSE substr(domain, length(rtrim(subdom, replace(subdom, '.', ''))) + 1) END AS dom2nd
FROM (
SELECT
domain,
--- everything behind the .TLD, e.g. "en.wikipedia.org" -> "en.wikipedia"
substr(domain, 1, length(rtrim(domain, replace(domain, '.', ''))) - 1) as subdom
FROM queries
WHERE
domain not like '%.arpa' -- special case
AND status IN (2, 3, 12, 13, 14, 17) -- currently defined "allowed" codes
) AS derived
GROUP BY dom2nd
ORDER BY count(1) DESC
LIMIT 10;
To be ran against the /etc/pihole/pihole-FTL.db.
This query could be improved (support more special cases, like .co.uk, …).
Also, it filters using the hard-coded currently defined "allowed" statuses, and shows the top 10 reached domain.
But this could be used as a base for a dashboard view.
I would be more convenient than running the query manually.