Get Pi-Hole metrics remotely using command line.
Get binary from Releases and save it somewhere in your $PATH
go build -o phstat
- get
PIHOLE_TOKEN
here http://your-pi-hole-ip/admin/settings.php?tab=api or here/etc/pihole/setupVars.conf
- add it to your
.bashrc
or.zshrc
:
export PIHOLE_HOST=your-pi-hole-ip
export PIHOLE_TOKEN=longtokenstring
Pi-Hole Dashboard. Docs: https://github.com/shuienko/phstat/blob/master/README.md
Usage: phstat [-h] [-n seconds]
-h show this page
-n seconds
update interval in seconds (default 2)