Best way to get recent domains handled by pihole

I would like to get a list of recent, live is even better, of domains that pihole handled.
The purpose is to alert myself if a recently registered domain appear to be used by my network.

The steps:

  1. periodically, query/get the list of recent domains from pihole
  2. For each of those domains, get their age
  3. If age less than X days, alert myself

I have some idea on how to do step 2 and 3. What are the options for step 1 ?

Context: I am running pihole inside Docker container that use Unbound in another container as DN server. I can do scripting, API call, etc ...

I saw that there is pihole tail that seems to allow to watch what pihole is doing. But that is inside the docker container right ?

Pihole have database in SQLite : should I regularly query against those ?

Telnet API can be use with some scripting ?

Packe dump: but that will require some work to parse ?

You probably could use Pi-hole's Audit Log for that purpose.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.