[BACK]Return to check_bioctl CVS log [TXT][DIR] Up to [local] / nagios / check_bioctl

Diff for /nagios/check_bioctl/check_bioctl between version 1.7 and 1.8

version 1.7, 2009/11/09 18:00:09 version 1.8, 2009/11/09 18:11:33
Line 1 
Line 1 
 #!/usr/bin/perl -T  #!/usr/bin/perl -T
 # $RedRiver: check_bioctl,v 1.6 2009/11/09 17:58:29 andrew Exp $  # $RedRiver: check_bioctl,v 1.7 2009/11/09 18:00:09 andrew Exp $
 ########################################################################  ########################################################################
 # check_bioctl *** A nagios check for OpenBSD bioctl  # check_bioctl *** A nagios check for OpenBSD bioctl
 #  #
 # 2006.07.26 #*#*# andrew fresh <andrew@mad-techies.org>  # 2006.07.26 #*#*# andrew fresh <andrew@mad-techies.org>
 ########################################################################  ########################################################################
 # TODO:  
 #   Really need real documentation.  
 ########################################################################  
 use strict;  use strict;
 use warnings;  use warnings;
   
Line 69 
Line 66 
   
 my %VOLUMES;  my %VOLUMES;
 foreach my $device (@devices) {  foreach my $device (@devices) {
     open my $bioctl, "-|", $BIOCTL, $device or die "Couldn't open bioctl: $!";      open my $bioctl, '-|', $BIOCTL, $device or die "Couldn't open bioctl: $!";
     my $volume_id;      my $volume_id;
   
     while (<$bioctl>) {      while (<$bioctl>) {
Line 141 
Line 138 
 }  }
   
 my $have_results = 0;  my $have_results = 0;
   $state = 'OK';
 foreach my $error ( sort { $ERRORS{$b} <=> $ERRORS{$a} } keys %ERRORS ) {  foreach my $error ( sort { $ERRORS{$b} <=> $ERRORS{$a} } keys %ERRORS ) {
     if ( exists $states{$error} ) {      if ( exists $states{$error} ) {
         $have_results++;          $have_results++;
Line 148 
Line 146 
   
         if (NAGIOS_OUTPUT) {          if (NAGIOS_OUTPUT) {
             print "$error (" . scalar( @{ $states{$error} } ) . ")";              print "$error (" . scalar( @{ $states{$error} } ) . ")";
             unless ( $error eq 'OK' ) {              if ( $error ne 'OK' ) {
                 print '<br>';                  print '<br>';
                 print map {" - $_<br>"} @{ $states{$error} };                  print map {" - $_<br>"} @{ $states{$error} };
             }              }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>