Napsty / check_smart

Monitoring Plugin to check hard drives, solid state drives and NVMe drives using SMART
https://www.claudiokuenzler.com/monitoring-plugins/check_smart.php
GNU General Public License v3.0
67 stars 20 forks source link

-g doesn't work for -i sat #55

Closed karaluh closed 4 years ago

karaluh commented 4 years ago

This is a regression, it used to work in 5.10. In the recent version I no longer see "sat" in the list of supported interfaces but the check, however, doesn't report any error:

sudo /usr/lib/nagios/plugins/check_smart.pl -g /dev/sd[a-b] -i sat
OK: [/dev/sda] - Device is clean|

There's also sdb though:

sudo /usr/lib/nagios/plugins/check_smart.pl -d /dev/sdb -i sat
OK: Drive  ST2000VN004-2E4164[...]

changing "sat" to either "ata" or "auto" leads to the same result: only the status of the first drive is reported.

karaluh commented 4 years ago

OK, I've found what was the problem, the device globbing must be put in quotation marks: -g "/dev/sd[a,b]"