Smart(d) Script zum Festplattencheck und Resultat per Mailverschicken

antiager

Active Member
Jan 15, 2020
144
5
38
62
61191 Rosbach vor der Höhe
Hallo Proxmoxler!

Hat jemand oder kennt jemand ein Script zum Checken der Smartwerte unter Proxmox?

Etwa so:

Checke alle Smartwerte aller Festplatten und übermittle das Resultat per Mail.

Macht man das per Script oder gibt es Bordmittel die man besser nutzt?

Hat vielleicht jemand ein Script?

Danke für eure Hilfe!!
 
Ich habe es ganz simpel laufen: Ein MTA (postfix) auf dem PVE, der jedweden Bla an mich sendet und in /etc/smartd.conf (smartmontools) die Zeile
Code:
DEVICESCAN -d removable -n standby -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
bzw.
Code:
/dev/sda -d megaraid,0 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,1 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,2 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,3 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,4 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,5 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,6 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -d megaraid,7 -a -m mich@example.org -M exec /usr/share/smartmontools/smartd-runner
(je nach Konfiguration des Controllers und Medien), so dass ich eine Info bekomme, wenn ein Medium ein Problem meldet - aber auch nur dann. Das ließe sich natürlich weiter ausbauen, wenn man öfters eine Übersicht seiner Medien gemeldet bekommen mag.
 
Nein. Der erste Block/Zeile wäre für "normale" Festplatte(n)/SSD(s), der zweite Block ist stellvertretend für meinen MegaRAID/SAS-Controller. Sind beides also nur Beispiele. Im Zweifel mit den smartmontools einfach herumspielen und/oder manpage lesen, passieren kann da nix.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!