Pi-Hole question / Blocked Queries being reset each day?
Hi there, I've just done the switch from NextDNS to PiHole. Simply because I want to test it out + self-host my DNS. I set up PiHole+Unbound two days ago, and yesterday the amount of "Queries blocked" was much higher that it is now. But this morning the number was down back to 100ish. Is this normal behaviour, is it supposed to reset the counter? I'd rather it didn't. Let me know if this is my fault or a setting I've managed to miss.
So, like a running sum? No, I don't think so, not in Pi-hole at least.
Pi-hole does have an API you could scrape, though. A Prometheus stack could track it and present a dashboard that shows the summation you want. There are other stats you could pull as well. This is a quick sample of what my home assistant integration sees
Make sure you're also blocking all other outbound DNS at your firewall. Many "smart" devices (and presumably some apps, though I have no way to check this) are hard coded to use 8.8.8.8 regardless of what DCHP says to use.
No he is saying that many smart devices ignore your DNS (pi-hole) as they hardcoded their DNS address to 8.8.8.8. So it is important to have an additional layer to block at the firewall.
Although not exactly what you are looking for (ie custom counters on the landing page), you can view counters you are after on another page under 'Long-term Data > Query Log'
#### MAXLOGAGE=24.0
Up to how many hours of queries should be imported from the database and logs? Values greater than the hard-coded maximum of 24h need a locally compiled `FTL` with a changed compile-time value.
I assume this is the setting you are suggesting can extend the query count period. It still will only give you the last N hours' worth of queries, which is not what OP asked. I gather OP wants to see the cumulative total of blocked queries over all time, and I doubt the FTL database tracks the data in a usable way to arrive at that number.