]> git.uio.no Git - check_openmanage.git/commitdiff
* version 3.6.1-beta2
authortrondham <trondham@e53b7cee-c147-0410-b3a0-ae4c1fa63963>
Wed, 15 Sep 2010 18:02:28 +0000 (18:02 +0000)
committertrondham <trondham@e53b7cee-c147-0410-b3a0-ae4c1fa63963>
Wed, 15 Sep 2010 18:02:28 +0000 (18:02 +0000)
* same as beta1, but for omreport

git-svn-id: svn+ssh://vcs-usit.uio.no/svnroot/usit-unix-intern/trunk/usit-nagios-plugins/trondham/check_openmanage@18275 e53b7cee-c147-0410-b3a0-ae4c1fa63963

check_openmanage

index 7fea42f643a3fac9ee9460cbffb168b9dc872923..324f55d57b21f529e9140f1a57f9556950d5806c 100755 (executable)
@@ -51,7 +51,7 @@ $SIG{__WARN__} = sub { push @perl_warnings, [@_]; };
 
 # Version and similar info
 $NAME    = 'check_openmanage';
-$VERSION = '3.6.1-beta1';
+$VERSION = '3.6.1-beta2';
 $AUTHOR  = 'Trond H. Amundsen';
 $CONTACT = 't.h.amundsen@usit.uio.no';
 
@@ -1472,13 +1472,16 @@ sub check_physical_disks {
            $progr    = ' [' . $out->{'Progress'} . ']';
            $ctrl     = $out->{'ctrl'};
            $nexus    = join q{:}, $out->{ctrl}, $id;
-           $vendor   = $out->{'Vendor ID'};
-           $product  = $out->{'Product ID'};
+           $vendor   = $out->{'Vendor ID'} ne q{} ? $out->{'Vendor ID'} : 'Unknown Vendor';
+           $product  = $out->{'Product ID'} ne q{} ? $out->{'Product ID'} : 'Unknown Product ID';
            $media    = $out->{'Media'};
            $spare    = $out->{'Hot Spare'};
            $bus      = $out->{'Bus Protocol'};
            $capacity = $out->{'Capacity'};
            $capacity =~ s{\A .*? \((\d+) \s bytes\) \z}{$1}xms;
+           if ($capacity eq 'Unavailable') {
+               $capacity = -1;
+           }
        }
 
        next PDISK if blacklisted('pdisk', $nexus);