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

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

version 1.7, 2006/05/02 21:03:53 version 1.8, 2006/05/02 22:23:29
Line 1 
Line 1 
 #!/usr/bin/perl  #!/usr/bin/perl
 # $RedRiver: check_hw_sensors,v 1.6 2006/05/02 19:59:47 andrew Exp $  # $RedRiver: check_hw_sensors,v 1.7 2006/05/02 20:03:53 andrew Exp $
 ########################################################################  ########################################################################
 # check_hw_sensors *** A nagios check for OpenBSD hw.sensors  # check_hw_sensors *** A nagios check for OpenBSD hw.sensors
 #  #
Line 155 
Line 155 
                 $state = $error;                  $state = $error;
         }          }
 }  }
 if (NAGIOS_OUTPUT && $have_results) {  
         print '<ul>';  
 }  
 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}) {
                 if (NAGIOS_OUTPUT) {                  if (NAGIOS_OUTPUT) {
                         print "<li>$error (" . scalar(@{ $states{ $error } }) . ")";                          print "$error (" . scalar(@{ $states{ $error } }) . ")";
                         unless ($error eq 'OK') {                          unless ($error eq 'OK') {
                                 print '<ul>';                                  print '<br />';
                                 foreach (@{ $states{ $error } }) {                                  print map { " - $_<br />" } @{ $states{ $error } };
                                         print "<li>$_</li>";  
                                 }  
                                 print '</ul>';  
                         }                          }
                         print "</li>"  
                 } else {                  } else {
                         print "$error (" . scalar(@{ $states{ $error } }) . "):\n";                          print "$error (" . scalar(@{ $states{ $error } }) . "):\n";
                         foreach (@{ $states{ $error } }) {                          foreach (@{ $states{ $error } }) {
Line 180 
Line 173 
 }  }
 if ($have_results == 0) {  if ($have_results == 0) {
         print "No results found\n";          print "No results found\n";
 }  
 if (NAGIOS_OUTPUT && $have_results) {  
         print '</ul>' . "\n";  
 }  }
 exit $ERRORS{$state};  exit $ERRORS{$state};
   

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

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