Installation - Grafana |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get autoclean -y
|
|
sudo apt-get install -y adduser libfontconfig1
|
|
wget https://dl.grafana.com/oss/release/grafana_8.3.1_amd64.deb
|
|
sudo dpkg -i grafana_8.3.1_amd64.deb
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl start grafana-server
|
|
sudo systemctl status grafana-server
|
|
|
|
Installation - Pihole Exporter |
wget https://github.com/eko/pihole-exporter/releases/latest/download/pihole_exporter-linux-amd64
|
|
sudo mkdir /etc/pihole_exporter
|
|
sudo mv pihole_exporter-linux-amd64 /etc/pihole_exporter
|
|
sudo chown pihole_exporter:pihole_exporter /etc/pihole_exporter/pihole_exporter-linux-amd64
|
|
sudo chmod +x /etc/pihole_exporter/pihole_exporter-linux-amd64
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl start pihole_exporter
|
|
sudo systemctl status pihole_exporter
|
|
|
|
Configuration & Service Creation |
sudo useradd -r pihole_exporter
|
|
sudo nano /etc/systemd/system/pihole_exporter.service
|
|
[Unit]
Description=pihole_exporter
[Service]
ExecStart=/etc/pihole_exporter/pihole_exporter-linux-amd64
WorkingDirectory=/etc/pihole_exporter
Restart=always
User=pihole_exporter
[Install]
WantedBy=multi-user.target
|
|
Enable the systemd service to run on startup, then start the service and check its status: |
|
sudo systemctl enable pihole_exporter
|
|
sudo systemctl start pihole_exporter
|
|
sudo systemctl status pihole_exporter
|
|
|
|
Now test that it is working! |
|
curl 127.0.0.1:9617
|
|
telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d/ --input-filter snmp -test
|
|
|
|