Audit Log


#1

The idea is to create an Audit log page, that looks maybe something link this:

---------------------------------------------------------------------------------
| Permitted domains                 | Blocked domains                           |
|-----------------------------------|-------------------------------------------|
| google.de    [Accept] [Blacklist] | googleadservices.com [Accept] [Whitelist] |
| ebay.com     [Accept] [Blacklist] | somebadguy.com       [Accept] [Whitelist] |
| amazon.co.uk [Accept] [Blacklist] | *.microsoft.com      [Accept] [Whitelist] |
| ...                               | ...                                       |
---------------------------------------------------------------------------------

The list will contain all lists that have been found in the Pi-hole log. Once, you click on [Accept], it will be removed from this table and saved in some list, so that it wouldn’t be shown in the future. However, it will also give you the option to [White-/Blacklist] this domain with one single click (and hide it afterwards as well, since you have decided what will happen with it).


Pi-hole v3.2 Introduces Long-term Statistics, An Audit Log, Colours, and More!
Filter out sites from Query Log
#2

#whendevssubmitfeaturerequests


#3

Made it better visible. It is already hidden in here.


#4

Actually I’m the annoying sh*t who keeps asking for this :relaxed:


#5

Having the ability to view hits per domain (sorted by highest to lowest, but reverse sorting would be a neat optional thing) is hugely useful, given I already use the “Top Domains” feature on the dashboard in this fashion!


#6

The required changes have been implemented in the FTL engine and can be used by adding for audit to the commands (e.g. via telnet). Like

>top-ads for audit

I implemented this as well in the backend (add desc, like in >top-ads desc), but let’s see what changes are necessary in the PHP API. Next steps are the implementation in the web interface and the connected core changes to add new accepted files to the audit list file.


#7

See


and

You can join testing the development version while still in progress via:

sudo pihole checkout web new/audit-log
sudo pihole checkout core new/auditlog

Note that you will need FTL v2.6 for the audit log


#8

@r0ckarong @WaLLy3K

I’m interested in your opinion. Currently, I don’t feel like I should implement the descending order property. The web interface part is still marked as [Work in progress] to indicate that it has not been finished (maybe?).

The domains are stored in /etc/pihole/auditlog.list which is a file that is hard-coded in FTL.


#9

I have switched to the dev branch you mentioned above and have access to the WIP state.

To properly understand the “Audit” button adds this to “auditlog” and ignores this from future listing yes?


#10

Number of items in auditlog.list should be displayed in gravity output imho.

Otherwise this is really useful and pretty much what I though of initially. This makes filtering “new” domains that keep cropping up much easier to manage.

Can you add some functionality to the audit log page that registers when you have made changes to black/whitelist and prompts you to Update the lists? A fat button “Update lists” would be helpful too. It’s somewhat unintuitive to make changes to abstract lists and then having to pull up what looks and feels like an update tool to write these changes.


#11

Yes

Okay

I see what you mean and will think about how to implement that best


#12

Implemented. Will be included in the next release.


#13

Hey, sry for this but I cant find the solution.
I pressed the button “Audit” for 2 domains on the Audit Log Page. How can I undo this? Where can I find the domains I added to auditing? It looks like these domains arent blocked anymore.


#14

The audit log entries are in /etc/pihole/auditlog.list

Edit that file to remove the erroneous entries, then restart pihole-FTL with sudo service pihole-FTL restart