Report of blocked domains to be sent to you by email or download report

Maybe this will suit your needs.
I've already explained here how to send yesterdays log (log rotation is available now, so use the instructions for pihole.log.1) to yourself.
By processing this log with some simple grep and sed commands, you can get the detailed information, redirect the output to a different file and mail it to yourself.
example for ipv4 wildcards (change the ip address to match your own):

grep 192.168.2.250 /var/log/pihole.log.1 | grep config | sed 's/^.*]:/]:/' | sed 's/^[^:]*://g' | sort | uniq

example for for ipv4 gravity list (change the ip address to match your own):

grep 192.168.2.250 /var/log/pihole.log.1 | grep gravity.list | sed 's/^.*]:/]:/' | sed 's/^[^:]*://g' | sort | uniq

I'm quite sure some people can come up with better grep/sed combinations, I'm not an expert.

2 Likes