The title is pretty self explanatory really! How can I trigger an email if physical disk health degrades? Also as a side point, how can I do similar for software raid or zfs array health?
The title is pretty self explanatory really! How can I trigger an email if physical disk health degrades? Also as a side point, how can I do similar for software raid or zfs array health?
Use Smartmontools with Ubuntu. The following is a good tutorial, and I used this on my home desktop machine. Since this is a desktop, I use GSmartControl which provides a nice interface.
https://help.ubuntu.com/community/Smartmontools
For my production servers (which are not Ubuntu), I still use Smartmontools. It's archaic, but the best thing available.
This depends on a variety of things. Many raid-controllers have their own tools to query this kind of information;
HP's SmartArray-controllers use HP's
hpacucli
-tool. I would in general recommend using this nagios plugin for checking the health of those disks, and HP server health in general.DELL's servers have their own
openmanage
-drivers that needs to be queried. A good Nagios-plugin for this is to be found here.If your harddrives support S.M.A.R.T (I believe all of them nowadays do), you can use check_smartmon.
Both of the above check RAID-status as well as physical drives. In some cases, if you make sure to update the plugins now and then - you will also be told when it's appropriate to update your firmware.
For software RAID in Linux, check_md_adm can be used.
There's a plugin for monitoring ZFS-pools on Nagios Exchange: link.