Repository: AdguardTeam/AdGuardHome

Issue #1176: Please add a new feature "Export query log as txt" in GUI interface,the log please make simple
Created: 2019-11-15T01:16:51Z
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

My AdGuardHome use for home & office,I cannot set the IP whitelist who can use my AGH,but I found that,many IP will use DNS flood my AGH,such as use SERVFAIL / NXDOMAIN / packet.cf flooding something like that,1 sec flood my AGH 4-5 times.
I want to send an abuse report to the above IP's ISP,such as digitalocean and amazonaws.com etc..
but many ISP only accept txt log,do not accept attachment.
I cannot find any simple txt log in AdGuardHome
/opt/AdGuardHome/data have a querylog.json but the size is very big,and the log is very complicated
for example

{"Question":"DqgBAAABAAAAAAABBnBhY2tldAJjZgAAAQABAAApIygAAAAAAAA=","Answer":"DqiBgAABAPQAAAAABnBhY2tldAJjZgAAAQABwAwAAQABAAAYtwAERUVFP8AMAAEAAQAAGLcABEVFRUDADAABAAEAABi3AARFRUVBwAwAAQABAAAYtwAERUVFQsAMAAEAAQAAGLcABEVFRUPADAABAAEAABi3AARFRUVEwAwAAQABAAAYtwAERUVFRcAMAAEAAQAAGLcABEVFRUbADAABAAEAABi3AARFRUVHwAwAAQABAAAYtwAERUVFSMAMAAEAAQAAGLcABEVFRUnADAABAAEAABi3AARFRUVKwAwAAQABAAAYtwAERUVFS8AMAAEAAQAAGLcABEVFRUzADAABAAEAABi3AARFRUVNwAwAAQABAAAYtwAERUVFTsAMAAEAAQAAGLcABEVFRU/ADAABAAEAABi3AARFRUVQwAwAAQABAAAYtwAERUVFUcAMAAEAAQAAGLcABEVFRVLADAABAAEAABi3AARFRUVTwAwAAQABAAAYtwAERUVFVMAMAAEAAQAAGLcABEVFRVXADAABAAEAABi3AARFRUVWwAwAAQABAAAYtwAERUVFV8AMAAEAAQAAGLcABEVFRVjADAABAAEAABi3AARFRUVZwAwAAQABAAAYtwAERUVFWsAMAAEAAQAAGLcABEVFRVvADAABAAEAABi3AARFRUVcwAwAAQABAAAYtwAERUVFXcAMAAEAAQAAGLcABEVFRV7ADAABAAEAABi3AARFRUVfwAwAAQABAAAYtwAERUVFYMAMAAEAAQAAGLcABEVFRWHADAABAAEAABi3AARFRUViwAwAAQABAAAYtwAERUVFY8AMAAEAAQAAGLcABEVFRWTADAABAAEAABi3AARFRUVlwAwAAQABAAAYtwAERUVFZsAMAAEAAQAAGLcABEVFRWfADAABAAEAABi3AARFRUVowAwAAQABAAAYtwAERUVFacAMAAEAAQAAGLcABEVFRWrADAABAAEAABi3AARFRUVrwAwAAQABAAAYtwAERUVFbMAMAAEAAQAAGLcABEVFRW3ADAABAAEAABi3AARFRUVuwAwAAQABAAAYtwAERUVFb8AMAAEAAQAAGLcABEVFRXDADAABAAEAABi3AARFRUVxwAwAAQABAAAYtwAERUVFcsAMAAEAAQAAGLcABEVFRXPADAABAAEAABi3AARFRUV0wAwAAQABAAAYtwAERUVFdcAMAAEAAQAAGLcABEVFRXbADAABAAEAABi3AARFRUV3wAwAAQABAAAYtwAERUVFeMAMAAEAAQAAGLcABEVFRXnADAABAAEAABi3AARFRUV6wAwAAQABAAAYtwAERUVFe8AMAAEAAQAAGLcABEVFRXzADAABAAEAABi3AARFRUV9wAwAAQABAAAYtwAERUVFfsAMAAEAAQAAGLcABEVFRX/ADAABAAEAABi3AARFRUWAwAwAAQABAAAYtwAERUVFgcAMAAEAAQAAGLcABEVFRYLADAABAAEAABi3AARFRUWDwAwAAQABAAAYtwAERUVFhMAMAAEAAQAAGLcABEVFRYXADAABAAEAABi3AARFRUWGwAwAAQABAAAYtwAERUVFh8AMAAEAAQAAGLcABEVFRYjADAABAAEAABi3AARFRUWJwAwAAQABAAAYtwAERUVFisAMAAEAAQAAGLcABEVFRYvADAABAAEAABi3AARFRUWMwAwAAQABAAAYtwAERUVFjcAMAAEAAQAAGLcABEVFRY7ADAABAAEAABi3AARFRUWPwAwAAQABAAAYtwAERUVFkMAMAAEAAQAAGLcABEVFRZHADAABAAEAABi3AARFRUWSwAwAAQABAAAYtwAERUVFk8AMAAEAAQAAGLcABEVFRZTADAABAAEAABi3AARFRUWVwAwAAQABAAAYtwAERUVFlsAMAAEAAQAAGLcABEVFRZfADAABAAEAABi3AARFRUWYwAwAAQABAAAYtwAERUVFmcAMAAEAAQAAGLcABEVFRZrADAABAAEAABi3AARFRUWbwAwAAQABAAAYtwAERUVFnMAMAAEAAQAAGLcABEVFRZ3ADAABAAEAABi3AARFRUWewAwAAQABAAAYtwAERUVFn8AMAAEAAQAAGLcABEVFRaDADAABAAEAABi3AARFRUWhwAwAAQABAAAYtwAERUVFosAMAAEAAQAAGLcABEVFRaPADAABAAEAABi3AARFRUWkwAwAAQABAAAYtwAERUVFpcAMAAEAAQAAGLcABEVFRabADAABAAEAABi3AARFRUWnwAwAAQABAAAYtwAERUVFqMAMAAEAAQAAGLcABEVFRanADAABAAEAABi3AARFRUWqwAwAAQABAAAYtwAERUVFq8AMAAEAAQAAGLcABEVFRazADAABAAEAABi3AARFRUWtwAwAAQABAAAYtwAERUVFrsAMAAEAAQAAGLcABEVFRa/ADAABAAEAABi3AARFRUWwwAwAAQABAAAYtwAERUVFscAMAAEAAQAAGLcABEVFRbLADAABAAEAABi3AARFRUWzwAwAAQABAAAYtwAERUVFtMAMAAEAAQAAGLcABEVFRbXADAABAAEAABi3AARFRUW2wAwAAQABAAAYtwAERUVFt8AMAAEAAQAAGLcABEVFRbjADAABAAEAABi3AARFRUW5wAwAAQABAAAYtwAERUVFusAMAAEAAQAAGLcABEVFRbvADAABAAEAABi3AARFRUW8wAwAAQABAAAYtwAERUVFvcAMAAEAAQAAGLcABEVFRb7ADAABAAEAABi3AARFRUW/wAwAAQABAAAYtwAERUVFwMAMAAEAAQAAGLcABEVFRcHADAABAAEAABi3AARFRUXCwAwAAQABAAAYtwAERUVFw8AMAAEAAQAAGLcABEVFRcTADAABAAEAABi3AARFRUXFwAwAAQABAAAYtwAERUVFxsAMAAEAAQAAGLcABEVFRcfADAABAAEAABi3AARFRUXIwAwAAQABAAAYtwAERUVFycAMAAEAAQAAGLcABEVFRcrADAABAAEAABi3AARFRUXLwAwAAQABAAAYtwAERUVFzMAMAAEAAQAAGLcABEVFRc3ADAABAAEAABi3AARFRUXOwAwAAQABAAAYtwAERUVFz8AMAAEAAQAAGLcABEVFRdDADAABAAEAABi3AARFRUXRwAwAAQABAAAYtwAERUVF0sAMAAEAAQAAGLcABEVFRdPADAABAAEAABi3AARFRUXUwAwAAQABAAAYtwAERUVF1cAMAAEAAQAAGLcABEVFRdbADAABAAEAABi3AARFRUXXwAwAAQABAAAYtwAERUVF2MAMAAEAAQAAGLcABEVFRdnADAABAAEAABi3AARFRUXawAwAAQABAAAYtwAERUVF28AMAAEAAQAAGLcABEVFRdzADAABAAEAABi3AARFRUXdwAwAAQABAAAYtwAERUVF3sAMAAEAAQAAGLcABEVFRd/ADAABAAEAABi3AARFRUXgwAwAAQABAAAYtwAERUVF4cAMAAEAAQAAGLcABEVFReLADAABAAEAABi3AARFRUXjwAwAAQABAAAYtwAERUVF5MAMAAEAAQAAGLcABEVFReXADAABAAEAABi3AARFRUXmwAwAAQABAAAYtwAERUVF58AMAAEAAQAAGLcABEVFRejADAABAAEAABi3AARFRUXpwAwAAQABAAAYtwAERUVF6sAMAAEAAQAAGLcABEVFRevADAABAAEAABi3AARFRUXswAwAAQABAAAYtwAERUVF7cAMAAEAAQAAGLcABEVFRe7ADAABAAEAABi3AARFRUXvwAwAAQABAAAYtwAERUVF8MAMAAEAAQAAGLcABEVFRfHADAABAAEAABi3AARFRUXywAwAAQABAAAYtwAERUVF88AMAAEAAQAAGLcABEVFRfTADAABAAEAABi3AARFRUUBwAwAAQABAAAYtwAERUVFAsAMAAEAAQAAGLcABEVFRQPADAABAAEAABi3AARFRUUEwAwAAQABAAAYtwAERUVFBcAMAAEAAQAAGLcABEVFRQbADAABAAEAABi3AARFRUUHwAwAAQABAAAYtwAERUVFCMAMAAEAAQAAGLcABEVFRQnADAABAAEAABi3AARFRUUKwAwAAQABAAAYtwAERUVFC8AMAAEAAQAAGLcABEVFRQzADAABAAEAABi3AARFRUUNwAwAAQABAAAYtwAERUVFDsAMAAEAAQAAGLcABEVFRQ/ADAABAAEAABi3AARFRUUQwAwAAQABAAAYtwAERUVFEcAMAAEAAQAAGLcABEVFRRLADAABAAEAABi3AARFRUUTwAwAAQABAAAYtwAERUVFFMAMAAEAAQAAGLcABEVFRRXADAABAAEAABi3AARFRUUWwAwAAQABAAAYtwAERUVFF8AMAAEAAQAAGLcABEVFRRjADAABAAEAABi3AARFRUUZwAwAAQABAAAYtwAERUVFGsAMAAEAAQAAGLcABEVFRRvADAABAAEAABi3AARFRUUcwAwAAQABAAAYtwAERUVFHcAMAAEAAQAAGLcABEVFRR7ADAABAAEAABi3AARFRUUfwAwAAQABAAAYtwAERUVFIMAMAAEAAQAAGLcABEVFRSHADAABAAEAABi3AARFRUUiwAwAAQABAAAYtwAERUVFI8AMAAEAAQAAGLcABEVFRSTADAABAAEAABi3AARFRUUlwAwAAQABAAAYtwAERUVFJsAMAAEAAQAAGLcABEVFRSfADAABAAEAABi3AARFRUUowAwAAQABAAAYtwAERUVFKcAMAAEAAQAAGLcABEVFRSrADAABAAEAABi3AARFRUUrwAwAAQABAAAYtwAERUVFLMAMAAEAAQAAGLcABEVFRS3ADAABAAEAABi3AARFRUUuwAwAAQABAAAYtwAERUVFL8AMAAEAAQAAGLcABEVFRTDADAABAAEAABi3AARFRUUxwAwAAQABAAAYtwAERUVFMsAMAAEAAQAAGLcABEVFRTPADAABAAEAABi3AARFRUU0wAwAAQABAAAYtwAERUVFNcAMAAEAAQAAGLcABEVFRTbADAABAAEAABi3AARFRUU3wAwAAQABAAAYtwAERUVFOMAMAAEAAQAAGLcABEVFRTnADAABAAEAABi3AARFRUU6wAwAAQABAAAYtwAERUVFO8AMAAEAAQAAGLcABEVFRTzADAABAAEAABi3AARFRUU9wAwAAQABAAAYtwAERUVFPg==","Result":{},"Time":"2019-11-15T06:39:11.679436766+08:00","Elapsed":1294157,"IP":"67.167.112.212"}

Also and I can't find any query log in /var/log/AdGuardHome.log

Please make a Export log as txt in AGH Query Log interface or make a simple query log in /var/log,let me can report abuse to ISP.

Duplicate issue #3285: Ability to download logs
Created: 2021-06-24T13:46:48Z
Problem Description
I find myself wondering about the DNS traffic on my network. And I would really like to download the full log of DNS queries/replies in a format that I can process. The log on the website is okay, but I'm not really able to search for specific record types etc. so having the full log in a script-friendly format would be nice.
Proposed Solution
Output the log as JSON, CSV, or a custom format
Alternatives Considered
Scraping the log on the web interface, but that seems a bit counter to the idea of running my own DNS server under HomeAssistant (which is how I'm using AdGuard Home). Unrelated it would also be nice if some AdGuard Home information could be made accessible to other HomeAssistant components. For example the amount of blocked queries, the total amount of queries etc. so that these could be used as part of an interface or to trigger rules.

Closing comment (2021-06-29T22:46:29Z): Duplicate of #1176