Monitoring Pi-hole with Prometheus

Export Pi-hole metrics into prometheus

Monitoring Pi-hole with Prometheus
A Prometheus exporter for PI-Hole’s Raspberry PI ad blocker - eko/pihole-exporter

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.

# amd64 ver. 0.0.8

# arm ver. 0.0.8

Once you have the the executable downloaded lets create a space for it

mkdir /opt/pihole_exporter

Create a system user to run the exporter

useradd -r pihole_exporter

Move the executable to the folder we created

mv pihole_exporter-linux-amd64 /opt/pihole_exporter

Make sure to set the correct permissions

chgrp pihole_exporter /opt/pihole_exporter
chgrp pihole_exporter /opt/pihole_exporter/pihole_exporter-linux-amd64
chmod +x /opt/pihole_exporter/pihole_exporter-linux-amd64
# NOTE: if you downloaded the arm release make sure you change the file name

Create a service file

nano /lib/systemd/system/pihole_exporter.service
systemctl daemon-reload
service pihole_exporter start
systemctl enable pihole_exporter


Service File

The exporter should now be running on port 9617


All thats left is to setup the Prometheus job

- job_name: pihole
  - targets:

The Github repo also provides a Grafana Dashboard.

Get $100 in cloud credits from DigitalOcean using my link:

DigitalOcean Referral Badge