check_smart: Version 5.4 released (allow SAS drives behind MegaRaid)

Written by - 0 comments

Published on February 5th 2015 - Listed in Nagios Monitoring Hardware


Bastian de Groot has sent me an important patch for the Nagios plugin check_smart.pl which adds a flexible lookup for the hard drive type (SCSI or ATA).

Before the patch, it was assumed, that drives behind a MegaRaid controller are (S)ATA drives, therefore awaiting the health strings for ATA drives:

     # separate metric-gathering and output analysis for ATA vs SCSI SMART output
     # Yeah - but megaraid is the same output as ata
     if ($interface =~ m/(ata|megaraid|sat)/) {         foreach my $line(@output){

That's complete bogus, of course! There can be SAS drives behind a MegaRaid controller. And as we all know, SAS is nothing else than a Serial Attached SCSI device. 

With the new lookup there is no fixed assumption anymore. The lookup checks itself from the output of the drive what kind of drive it is:

    my $line_str_ata = 'SMART overall-health self-assessment test result: '; # ATA SMART line
    my $line_str_scsi = 'SMART Health Status: '; # SCSI and CCISS SMART line

So big thanks to Bastian for that contribution!


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.