So, you added check_smart.pl to a new server and ran into this error:
UNKNOWN: Drive S/N : No health status line found
This means the Nagios user doesn’t have the necessary permissions to execute the command—pretty clear from the error, right?
Fortunately, you’ve found the right place to fix it! If check_smart.pl is located in /usr/lib/nagios/plugins/, just add the following line to the sudoers file:
# grep nagios /etc/sudoers nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/check_smart.pl
That should do the trick!