Created
April 15, 2022 22:11
-
-
Save bergpb/4dff2b03905b171d4d608dd7fd380486 to your computer and use it in GitHub Desktop.
Install PiHole Exporter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://www.observability.blog/monitoring-pi-hole-with-prometheus/ | |
| # https://github.com/eko/pihole-exporter | |
| sudo curl https://github.com/eko/pihole-exporter/releases/download/v0.3.0/pihole_exporter-linux-arm --output /usr/local/bin/pihole_exporter | |
| sudo useradd -r -s /bin/false pihole_exporter | |
| # sudo chgrp pihole_exporter /usr/local/bin/pihole_exporter | |
| sudo chown pihole_exporter:pihole_exporter /usr/local/bin/pihole_exporter | |
| sudo chmod +x /usr/local/bin/pihole_exporter | |
| sudo touch /etc/systemd/system/pihole_exporter.service | |
| # init | |
| [Unit] | |
| Description=pihole_exporter | |
| Wants=network-online.target | |
| After=network-online.target | |
| [Service] | |
| ExecStart=/usr/local/bin/pihole_exporter | |
| # WorkingDirectory=/usr/local/bin/pihole_exporter | |
| Restart=always | |
| User=pihole_exporter | |
| [Install] | |
| WantedBy=multi-user.target | |
| # end | |
| sudo systemctl daemon-reload | |
| sudo systemctl enable pihole_exporter | |
| sudo systemctl start pihole_exporter | |
| curl localhost:9617/metrics | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment