version 1.4, 2006/07/31 21:47:07 |
version 1.5, 2009/11/09 17:57:32 |
|
|
#!/usr/bin/perl -T |
#!/usr/bin/perl -T |
# $RedRiver: check_bioctl,v 1.3 2006/07/27 20:34:02 andrew Exp $ |
# $RedRiver: check_bioctl,v 1.4 2006/07/31 20:47:07 andrew Exp $ |
######################################################################## |
######################################################################## |
# check_bioctl *** A nagios check for OpenBSD bioctl |
# check_bioctl *** A nagios check for OpenBSD bioctl |
# |
# |
|
|
} |
} |
|
|
my $have_results = 0; |
my $have_results = 0; |
foreach my $error (sort { $ERRORS{$a} <=> $ERRORS{$b} } keys %ERRORS) { |
|
if (exists $states{$error}) { |
|
$have_results++; |
|
$state = $error; |
|
} |
|
} |
|
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++; |
|
$state = $error if $ERORRS{$state} < $ERRORS{$error}; |
|
|
if (NAGIOS_OUTPUT) { |
if (NAGIOS_OUTPUT) { |
print "$error (" . scalar(@{ $states{ $error } }) . ")"; |
print "$error (" . scalar(@{ $states{ $error } }) . ")"; |
unless ($error eq 'OK') { |
unless ($error eq 'OK') { |