Get stats of a Pihole instance at command line.
Go to file
Jeffrey Serio ecb923d9ec Update README.md 2021-08-19 19:45:00 -05:00
.gitignore Initial commit 2021-07-03 19:14:44 -05:00
LICENSE Initial commit 2021-07-03 19:14:44 -05:00
README.md Update README.md 2021-08-19 19:45:00 -05:00
pihole-stats.go Initial commit 2021-07-03 19:14:44 -05:00

README.md

go-pihole-stats

WIP

Get stats from your Pi-hole instance at the command-line.

To use, one must have a running Pi-hole instance on one's network. Export the following environment variables:

Note: the auth token is stored in the WEBPASSWORD variable in /etc/pihole/setupVars.conf on the Pi-hole machine.

export PIHOLE_URL="http://pi.hole/admin"
export PIHOLE_AUTH="auth token"

Install the program:

go get -v git.envs.net/hyperreal/go-pihole-stats

Ensure GOPATH is set and in PATH:

export GOPATH="${HOME}/go"
export PATH="${PATH}:${GOPATH}"

Run the command to get Pihole stats:

go-pihole-stats