add .editorconfig, format files correctly
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
b42e39ed0a
commit
fbb8840dff
33 changed files with 240 additions and 238 deletions
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/perl -w
|
||||
# editorconfig-checker-disable-file
|
||||
# Check SMART status of ATA/SCSI/NVMe drives, returning any usable metrics as perfdata.
|
||||
# For usage information, run ./check_smart -h
|
||||
#
|
||||
|
@ -105,7 +106,7 @@ if ($opt_d || $opt_g ) {
|
|||
# normal mode - push opt_d on the list of devices
|
||||
push(@dev,$opt_d);
|
||||
} else {
|
||||
# glob all devices - try '?' first
|
||||
# glob all devices - try '?' first
|
||||
@dev =glob($opt_g);
|
||||
}
|
||||
|
||||
|
@ -222,8 +223,8 @@ foreach $device ( split(":",$device) ){
|
|||
# we had a pattern based on $opt_g
|
||||
$tag = $device;
|
||||
$tag =~ s/\Q$opt_g\E//;
|
||||
if($interface =~ qr/(?:megaraid|3ware|cciss)/){
|
||||
$label = "[$interface] - ";
|
||||
if($interface =~ qr/(?:megaraid|3ware|cciss)/){
|
||||
$label = "[$interface] - ";
|
||||
} else {
|
||||
$label = "[$device] - ";
|
||||
}
|
||||
|
@ -428,7 +429,7 @@ foreach $device ( split(":",$device) ){
|
|||
warn "(debug) Exclude List for Checks: ", join(",", @exclude_checks), "\n" if $opt_debug;
|
||||
warn "(debug) Exclude List for Perfdata: ", join(",", @exclude_perfdata), "\n" if $opt_debug;
|
||||
warn "(debug) Warning Thresholds:\n" if $opt_debug;
|
||||
for my $warnpair ( sort keys %warn_list ) { warn "$warnpair=$warn_list{$warnpair}\n" if $opt_debug; }
|
||||
for my $warnpair ( sort keys %warn_list ) { warn "$warnpair=$warn_list{$warnpair}\n" if $opt_debug; }
|
||||
warn "\n" if $opt_debug;
|
||||
|
||||
# separate metric-gathering and output analysis for ATA vs SCSI SMART output
|
||||
|
@ -673,11 +674,11 @@ foreach $device ( split(":",$device) ){
|
|||
}
|
||||
warn "(debug) gathered perfdata:\n@perfdata\n\n" if $opt_debug;
|
||||
$perf_string = join(' ', @perfdata);
|
||||
|
||||
|
||||
warn "###########################################################\n" if $opt_debug;
|
||||
warn "(debug) LOCAL STATUS: $exit_status_local, FINAL STATUS: $exit_status\n" if $opt_debug;
|
||||
warn "###########################################################\n\n\n" if $opt_debug;
|
||||
|
||||
|
||||
if($exit_status_local ne 'OK'){
|
||||
if ($opt_g) {
|
||||
$status_string = $label.join(', ', @error_messages);
|
||||
|
@ -687,7 +688,7 @@ foreach $device ( split(":",$device) ){
|
|||
$status_string = join(', ', @error_messages);
|
||||
}
|
||||
push @drives_status_not_okay, $status_string;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($opt_g) {
|
||||
$status_string = $label."Device is clean";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue