You could write a script and run it with cron.
the code in this thread (and additional info on how to send the mail) would do something like this:
or
check it out:
same principle can be applied for a 24 hour period.
You'd have to script that though ...
There is a way to access the APi for a real-time output via python:
You could pipe that and go from there:
Here's a sample code that I have implemented:
#!/usr/bin/env python
import json
import urllib2
import os
try:
f = urllib2.urlopen('http://pi.hole/admin/api.php')
json_string = f.read()
parsed_json = json.loads(json_string)
queries = parsed_json['dns_queries_today']
adsblocked = parsed_json['ads_blocked_today']
clients = parsed_json['unique_clients']
f.close()
except:
queries = '-'
adsblocked = '-'
clients = '-'
stats = 'DNS Queries: ' + str(queries) + ' - ' + 'Blocked ads: ' + str(adsblocked) + ' - ' + 'Devices: ' + str(clients) + ' '
print stats
you can create a script that does stuff based on those printed values.
I personally use push notifications to my devices with that info and it looks like this:
As for this, it can be scripted and I also thought about it but my network does not accept guest devices unless I allow it and at that point, i decided not to pursue the implementation due to the amount of work needed to script this, versus actual benefit.


