Skip to content
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

Exclude certain domains / IPs from statistics #1717

Closed
3 tasks done
adrianmace opened this issue May 22, 2020 · 29 comments
Closed
3 tasks done

Exclude certain domains / IPs from statistics #1717

adrianmace opened this issue May 22, 2020 · 29 comments

Comments

@adrianmace
Copy link

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Problem Description

A number of devices - monitoring and updaters - check frequently for the same hostnames. Due to the fact that the TTL is overriden by Adguardhome, these checks greatly skew the statistics. My monitoring device makes 21,600 requests to google.com a day - one every 4 seconds - for example.

My Swann cameras have a bug that's causing a lookup every 5 seconds to www.amazonaws.com. 17,280 times per 24 hours.

Proposed Solution

Offer a way to remove certain domains (www.amazonaws.com) and certain IPs (192.168.1.2) from the statistics gathering process. Still apply the same customised filters and what not, but remove them from the statistics.

Alternatives Considered

Currently bypassing the Adguardhome for these devices affected and going straight to upstream DNS.

Additional Information

PiHole has this, but I like Adguardhome's UI and static Go binary more.

@ameshkov
Copy link
Member

Well, let's see how many upvotes it gets.

@adrianmace
Copy link
Author

Well, let's see how many upvotes it gets.

Thanks for getting back to me. All the best.

@ameshkov
Copy link
Member

One more similar feature request:
#1714

@Aikatsui
Copy link
Contributor

Aikatsui commented May 22, 2020

Suggestion: implement this feature on single control panel #481 (comment) in query log then user can apply complex/flexible rules, filters, sorts (date range, time range, hide unwanted domains #594 (comment), hide clients, sort for certain devices) etc and then generate result for web-app wide including dashboard, lists pages (see -->#580), client page (see --> #1336) and keep till user edit or clear it manually same as github.

If add control panel(s) to dashboard then it takes unwanted space but it'll be better if dashboard results (total queries, malware/phishing, adult queries, processing time, top clients, domains top blocked clients, domains etc) able to manage through query log control panel as mentioned above

Similar feature requests #1714 > #594 #594 (comment)

Optionally, you can get benefit from #1164 (Collapse feature)

@adrianmace
Copy link
Author

Some images to highlight the problem:
image
image

@ameshkov
Copy link
Member

I wonder would it be enough if we simply add a Client setting: "Do not log queries"?

@adrianmace
Copy link
Author

That would work for me. The reason they’re named is because I set that up in my search for this setting before realising it didn’t exist.

I’d like to eventually be able to exclude domains, but per-client is good enough if it’s easier / faster to develop.

@Aikatsui
Copy link
Contributor

Aikatsui commented May 24, 2020

I wonder would it be enough if we simply add a Client setting: "Do not log queries"?

If implement, Would it be possible to mod it bit: "Do not display queries"? so we still have them to check when necessary and again user has chance to enable/disable that "do not display" option through client settings.

@Buddinski88
Copy link

Is there any info here on when this feature will be ready?
I currently have 120k requests in the log coming from my RaspberryPi with Raspberrymatic. Every 15 seconds it checks against my Fritzbox if two devices are online (presence detection). This distorts the statistics enormously :-)

@ameshkov
Copy link
Member

Will only be done after the frontend rework.

Tbh, I'd like to keep this feature purely on the UI side (show smth like "X domains are hidden (N requests)").

@Buddinski88
Copy link

Buddinski88 commented Jan 11, 2022

Will only be done after the frontend rework.
Tbh, I'd like to keep this feature purely on the UI side (show smth like "X domains are hidden (N requests)").

Thank you for the update.
In general that seems to be fine. Will that count then also be excluded from the statistics?

@ameshkov
Copy link
Member

In general that seems to be fine. Will that count then also be excluded from the statistics?

No, if it's purely frontend we won't be able to get rid of them there.

@Buddinski88
Copy link

In general that seems to be fine. Will that count then also be excluded from the statistics?

No, if it's purely frontend we won't be able to get rid of them there.

First of all, thank you for your feedback and sorry that it took me so long.
Basically I understand your answer, but it would only provide a real added value if the numbers are also excluded from the statistics. For example, the statement "5%" requests were blocked would be appropriate.
I think this adjustment is not a short term issue, but for the future - I think - everyone would benefit from exculpating certain devices from the statistics. Example from my side. Due to presence detection, my smarthome system asks my Fritzbox every 30 seconds if two devices are logged into the WLAN. That's X thousands of requests in a few days and that distorts the statistics enormously.

@danieletorelli
Copy link

Sometimes you might just want to hide some queries from the statistics, while some other times you might not even care of recording some queries at all.
I suppose that leaving the user free to choose would provide way better added value in both cases, since IMO the use cases are so vary that all assumptions here could be misleading.

@MattXcz
Copy link

MattXcz commented Mar 30, 2022

I am also +1 for this future request... I have some IOT clients, which spam query log and statistics

@Toxicolo

This comment was marked as off-topic.

@NemoN

This comment was marked as off-topic.

@MSlawik

This comment was marked as off-topic.

@jamboc88

This comment was marked as outdated.

@ameshkov ameshkov removed this from the v1.0.0 milestone Mar 31, 2022
@ameshkov ameshkov added this to the v0.108.0 milestone Mar 31, 2022
@ameshkov
Copy link
Member

Okay, it's too popular to keep it on v1.0.0. We're doing the frontend rework&redesign in v0.108.0, let's squeeze this one there as well.

@MattXcz
Copy link

MattXcz commented Mar 31, 2022

Stats + query log too.So we dont have these request over and over in log

@HyperCriSiS
Copy link

HyperCriSiS commented Jul 24, 2022

I also have devices which do HUGE amounts of querys of one or more domains. It would be good to be able to drop specific domains completely. No log at all.

@danbo
Copy link

danbo commented Oct 2, 2022

I was going to ask about a slightly different feature - separate statistics out by interface or subnet.

Ultimately I think we're all saying the same thing here - we would very much appreciate a way to filter noise out of statistics. (domain/ips/subnets/interfaces)

adguard pushed a commit that referenced this issue Feb 13, 2023
Merge in DNS/adguard-home from 4299-stats-ignore to master

Updates #1717.
Updates #4299.

Squashed commit of the following:

commit 1d1212d
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 13 17:53:36 2023 +0300

    fix changelog

commit 5f56852
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 13 17:39:02 2023 +0300

    add todo; fix data race

commit 89b8b16
Merge: e0a6bb4 ec19a85
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 17:21:38 2023 +0300

    Merge branch 'master' into 4299-stats-ignore

commit e0a6bb4
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 17:21:06 2023 +0300

    interval under mutex

commit c569c7b
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 16:19:35 2023 +0300

    fix mutex

commit 9374cf0
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 16:03:17 2023 +0300

    fix typo

commit 1f4fd1e
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 15:55:44 2023 +0300

    add mutex

commit 2148048
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 12:27:36 2023 +0300

    add key check

commit a193509
Author: Stanislav Chzhen <[email protected]>
Date:   Thu Feb 9 18:34:36 2023 +0300

    fix changelog

commit 23c3b6d
Merge: 8fccc0b b89105e
Author: Stanislav Chzhen <[email protected]>
Date:   Thu Feb 9 13:28:59 2023 +0300

    Merge branch 'master' into 4299-stats-ignore

commit 8fccc0b
Author: Stanislav Chzhen <[email protected]>
Date:   Thu Feb 9 13:27:42 2023 +0300

    add changelog

commit 0416c71
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Feb 8 14:31:55 2023 +0300

    all: stats ignore
@nemo-ex

This comment was marked as duplicate.

@ainar-g
Copy link
Contributor

ainar-g commented Mar 10, 2023

@jiangmw, please use reactions on the OP instead of “+1”-like comments. Thanks.

In case people watching this issue have missed it, the most recent releases of AdGuard Home have the feature of ignoring requests by their query domain names, but it's currently only available through the configuration file. API and UI are coming soon.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 4299-stats-ignore to master

Updates AdguardTeam#1717.
Updates AdguardTeam#4299.

Squashed commit of the following:

commit 1d1212d
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 13 17:53:36 2023 +0300

    fix changelog

commit 5f56852
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 13 17:39:02 2023 +0300

    add todo; fix data race

commit 89b8b16
Merge: e0a6bb4 ec19a85
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 17:21:38 2023 +0300

    Merge branch 'master' into 4299-stats-ignore

commit e0a6bb4
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 17:21:06 2023 +0300

    interval under mutex

commit c569c7b
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 16:19:35 2023 +0300

    fix mutex

commit 9374cf0
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 16:03:17 2023 +0300

    fix typo

commit 1f4fd1e
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 15:55:44 2023 +0300

    add mutex

commit 2148048
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Feb 10 12:27:36 2023 +0300

    add key check

commit a193509
Author: Stanislav Chzhen <[email protected]>
Date:   Thu Feb 9 18:34:36 2023 +0300

    fix changelog

commit 23c3b6d
Merge: 8fccc0b b89105e
Author: Stanislav Chzhen <[email protected]>
Date:   Thu Feb 9 13:28:59 2023 +0300

    Merge branch 'master' into 4299-stats-ignore

commit 8fccc0b
Author: Stanislav Chzhen <[email protected]>
Date:   Thu Feb 9 13:27:42 2023 +0300

    add changelog

commit 0416c71
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Feb 8 14:31:55 2023 +0300

    all: stats ignore
adguard pushed a commit that referenced this issue Mar 23, 2023
Merge in DNS/adguard-home from 4299-querylog-stats-api to master

Updates #1717.
Updates #4299.

Squashed commit of the following:

commit 5b706b7
Merge: 48b62b0 306c198
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Mar 22 13:53:09 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit 48b62b0
Author: Vladislav Abdulmyanov <[email protected]>
Date:   Wed Mar 22 12:25:04 2023 +0200

    client: fix styles, add titles and descrs

commit 97e31cf
Author: Vladislav Abdulmyanov <[email protected]>
Date:   Tue Mar 21 18:38:12 2023 +0200

    client: add ignored domains for querylog

commit 24d75c4
Author: Vladislav Abdulmyanov <[email protected]>
Date:   Tue Mar 21 18:21:13 2023 +0200

    client: add ignore domains for stats

commit eefc389
Merge: 978675e 1daabb9
Author: Stanislav Chzhen <[email protected]>
Date:   Tue Mar 21 10:53:35 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit 978675e
Author: Stanislav Chzhen <[email protected]>
Date:   Tue Mar 21 10:53:11 2023 +0300

    openapi: fix chlog

commit 2ed3300
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Mar 20 17:49:07 2023 +0300

    home: fix tests

commit 6af1152
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Mar 20 17:40:16 2023 +0300

    home: fix typo

commit 56acdfd
Merge: 319da34 48431f8
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Mar 20 17:32:58 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit 319da34
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Mar 3 17:34:38 2023 +0300

    querylog: fix docs

commit d5a8f24
Author: Stanislav Chzhen <[email protected]>
Date:   Fri Mar 3 11:42:00 2023 +0300

    stats: fix docs

commit e0cbfc1
Merge: 4743c81 012e5be
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Mar 1 18:45:17 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit 4743c81
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Mar 1 18:14:16 2023 +0300

    all: imp code; fix time conversion

commit 34310cf
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Mar 1 12:34:11 2023 +0300

    chlog: restore order

commit cadd864
Merge: 2f3e25b bb22643
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Mar 1 12:26:06 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit 2f3e25b
Author: Stanislav Chzhen <[email protected]>
Date:   Wed Mar 1 12:25:14 2023 +0300

    all: fix fmt

commit d54022b
Author: Stanislav Chzhen <[email protected]>
Date:   Tue Feb 28 16:16:40 2023 +0300

    all: imp code; fix chlog

commit df22de9
Merge: e1ea479 a772212
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 27 17:24:09 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit e1ea479
Merge: d7db0a5 bb80a7c
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 27 17:23:20 2023 +0300

    Merge branch 'master' into 4299-querylog-stats-api

commit d7db0a5
Author: Stanislav Chzhen <[email protected]>
Date:   Mon Feb 27 17:12:20 2023 +0300

    all: imp docs

... and 15 more commits
@ainar-g ainar-g modified the milestones: v0.108.0, v0.107.29 Apr 12, 2023
@ainar-g ainar-g modified the milestones: v0.107.30, v0.107.29 Apr 18, 2023
@ainar-g
Copy link
Contributor

ainar-g commented Apr 18, 2023

Implemented for both domains and clients on Edge and in the upcoming release.

@ainar-g ainar-g closed this as completed Apr 18, 2023
@rfgamaral
Copy link

Is it possible to ignore wildcard domains? Adding *.example.com doesn't seem to be working :(

@don-dolarson
Copy link

Is it possible to ignore wildcard domains? Adding *.example.com doesn't seem to be working :(

Wildcards doesn't seem to work for me neither on latest v0.107.32. Anyone else?

@ainar-g
Copy link
Contributor

ainar-g commented Jun 30, 2023

@rfgamaral, @don-dolarson, they aren't supported now. Please upvote #5720. (Do not post “+1” comments as one cannot sort by those in Github; a “:+1:” reaction on the top comment is enough.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests