for more information see here
for more information about sending proxmox notifications see here
- smartctl must be installed
- smtp client must be installed and configured
smart.sh
can be used to trigger test runs and to retrieve test results (email)
Options | Comment | Example value | ||
---|---|---|---|---|
-d |
--device |
specify device to be used | /dev/sda |
|
-h |
--help |
show help | ||
-m |
--mode |
specify mode to be used | test |
|
test |
run a new test | |||
result |
provide results of a previously triggered test | |||
-r |
--recipient |
specify recipient (email) to be notified when using result mode [-m result] |
[email protected] |
|
-t |
--test-mode |
specify smartctl test mode to be used | short |
|
short |
||||
long |
- to automate test runs a crontab entry can be used:
crontab -e
# run a long test for /dev/sda every first day of the month at 1 am
0 1 1 * * /root/Homelab-Tools/monitoring/smart.sh -m test -d /dev/sda -t long
# provide test results for /dev/sda every second day of the month at 1 am
0 1 2 * * /root/Homelab-Tools/monitoring/smart.sh -m result -d /dev/sda -r [email protected]
# run short test for device /dev/sda
smartctl -t short /dev/sda
# run long test for device /dev/sda
smartctl -t long /dev/sda
# show test results for device /dev/sda
smartctl -a /dev/sda
# show temp for multiple devices
hddtemp /dev/sd[a-d]
# show temp for device as numeric
hddtemp /dev/sda --numeric
Easiest way to use Prometheus and Grafana is by using docker-compose file
use setup-node-exporter.sh script for setup on Debian/Ubuntu
see Pi-Hole Prometheus Exporter GitHub page for further information
- create new user
sudo useradd pihole_exporter -s /sbin/nologin
- download pihole_exporter
check for newest version on pihole-exporter GitHub page
wget https://github.com/eko/pihole-exporter/releases/download/v0.3.0/pihole_exporter-linux-amd64
- make pihole_exporter executable and move
chmod +x pihole_exporter-linux-amd64
sudo cp pihole_exporter-linux-amd64 /usr/bin/pihole_exporter
- create new service
sudo nano /etc/systemd/system/pihole_exporter.service
add content from pihole_exporter.service
- create start script
sudo nano /etc/pihole/pihole-exporter.sh
add content from pihole_exporter.service
make script executable
sudo chmod +x /etc/pihole/pihole-exporter.sh
- activate and start service
sudo systemctl daemon-reload
sudo systemctl enable pihole_exporter
sudo systemctl start pihole_exporter
use docker-compose.yml file to setup cAdvisor