fonte: https://jarrodstech.net/how-to-pihole-exporter-install-with-prometheus-and-grafana-on-ubuntu-20-04/
Releases: https://github.com/eko/pihole-exporter/releases/
useradd --system --shell=/usr/sbin/nologin pihole_exporter
sudo mkdir /opt/pihole_exporter
mover o binario para esta pasta criada
sudo chmod -R 500 pihole_exporter/
sudo chown -R pihole_exporter:pihole_exporter pihole_exporter/
- Paste in the following code, replace 10.0.0.4 and xyz with your pihole IP and password.
[Unit]
Description=pihole_exporter
[Service]
ExecStart=/opt/pihole_exporter/pihole_exporter-linux-amd64 -pihole_hostname 10.0.0.4 -pihole_password xyz WorkingDirectory=/opt/pihole_exporter
Restart=always
User=pihole_exporter
[Install]
WantedBy=multi-user.target
- Press ctrl + x and type y then enter to save the file
- Reload the system daemon systemctl daemon-reload
- Run the service service pihole_exporter start
- Enable it to run at start up systemctl enable pihole_exporter
- Lastly check the status systemctl status pihole_exporter – press q to exit this view