Monitoring Pi-hole with Prometheus (observability.blog)
pihole-exporter is a Go application that exports Pi-hole metrics.
The first step is downloading the correct release. In my case I run Pi-hole on a Debian VM so I downloaded the amd64 release. If you run Pi-hole on a Raspberry Pi you will need the arm release.
https://github.com/eko/pihole-exporter/releases
Once you have the the executable downloaded lets create a space for it
Create a system user to run the exporter
Move the executable to the folder we created
Make sure to set the correct permissions
Create a service file
The exporter should now be running on port 9617
All thats left is to setup the Prometheus job
The Github repo also provides a Grafana Dashboard.
https://github.com/eko/pihole-exporter/blob/master/grafana/dashboard.json