|
|
@ -1,6 +1,7 @@
|
|
|
|
#!/usr/bin/perl
|
|
|
|
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Getopt::Long;
|
|
|
|
|
|
|
|
|
|
|
|
my $warn = 92.0;
|
|
|
|
my $warn = 92.0;
|
|
|
|
my $crit = 96.0;
|
|
|
|
my $crit = 96.0;
|
|
|
@ -74,12 +75,22 @@ sub aggregate_errors {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
my $no_thinpools_ok = 0;
|
|
|
|
|
|
|
|
GetOptions("no-thinpools-ok" => \$no_thinpools_ok)
|
|
|
|
|
|
|
|
or die("Error in command line arguments\n");
|
|
|
|
|
|
|
|
|
|
|
|
my @thinpools = get_thinpools();
|
|
|
|
my @thinpools = get_thinpools();
|
|
|
|
|
|
|
|
|
|
|
|
# No thinpool found?
|
|
|
|
# No thinpool found?
|
|
|
|
if (scalar @thinpools == 0) {
|
|
|
|
if (scalar @thinpools == 0) {
|
|
|
|
print "UNKNOWN: No thinpools found.\n";
|
|
|
|
if ($no_thinpools_ok == 1) {
|
|
|
|
exit 3;
|
|
|
|
print "OK: No thinpools found.\n";
|
|
|
|
|
|
|
|
exit 0;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
print "UNKNOWN: No thinpools found.\n";
|
|
|
|
|
|
|
|
exit 3;
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
check_thinpools();
|
|
|
|
check_thinpools();
|
|
|
|
aggregate_errors();
|
|
|
|
aggregate_errors();
|
|
|
|