In the past days I've been working together with Jerome Lauret on a new version of the check_smart monitoring plugin.
His changes introduce the -g/--global parameter which can be used to do SMART checks on multiple disks at the same time. The given value is handled as regular expression, so if you use "-g /dev/sd", check_smart will look for all disks found starting with /dev/sd* (/dev/sda, /dev/sdb, /dev/sdc, etc).
/usr/lib/nagios/plugins/check_smart.pl -g /dev/sd -i ata
OK: [/dev/sda] - Device is clean --- [/dev/sdb] - Device is clean|
This also works on certain hardware raids, as long as the interface (-i) is static:
/usr/local/libexec/nagios/plugins/check_smart.pl -g /dev/pass -i scsi
OK: [/dev/pass0] - Device is clean --- [/dev/pass1] - Device is clean --- [/dev/pass2] - Device is clean --- [/dev/pass3] - Device is clean |
Note that there are no performance data, when the -g is used. Depending on the amount of disks in a system the output would just be too long.
The original check (with -d) still works of course:
/usr/local/libexec/nagios/check_smart_g.pl -d /dev/pass4 -i scsi
OK: no SMART errors detected. | sent_blocks=2132703124 temperature=32;;68
Thanks a lot to Jerome for his great work and contribution!