mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-21 18:03:45 +01:00
Regex filtering broke disk checks
This commit is contained in:
parent
9060a171f0
commit
bf0edd899b
@ -251,10 +251,10 @@ if ($ret > 1) {
|
||||
#
|
||||
|
||||
foreach my $l (@output) {
|
||||
next if ($l =~ m/$opt_R/);
|
||||
next if ($l !~ m/$opt_r/);
|
||||
next if ($l =~ m/$exclude_re/);
|
||||
if($l =~ /(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\%\s+([\/\w\d\.-]+)$/) {
|
||||
next if ($l =~ m/$opt_R/);
|
||||
next if ($l !~ m/$opt_r/);
|
||||
next if ($l =~ m/$exclude_re/);
|
||||
my ($s,$u,$f,$pu,$d) = ($1,$2,$3,$4,$5);
|
||||
$alldisks{$d}->{pused} = $pu;
|
||||
$alldisks{$d}->{pfree} = 100-$pu;
|
||||
@ -268,10 +268,10 @@ foreach my $l (@output) {
|
||||
# This is the output of df.exe on Windows
|
||||
#C:\ 9097126 6094081 3003045 67% argon-c (ntfs)
|
||||
else {
|
||||
if ($l =~ /(\w)\:\\\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\%\s+(.*)$/) {
|
||||
next if ($l =~ m/$opt_R/);
|
||||
next if ($l !~ m/$opt_r/);
|
||||
next if ($l =~ m/$exclude_re/);
|
||||
if ($l =~ /(\w)\:\\\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\%\s+(.*)$/) {
|
||||
my ($d,$s,$u,$f,$pu) = ("/$1",$2,$3,$4,$5);
|
||||
$alldisks{$d}->{pused} = $pu;
|
||||
$alldisks{$d}->{pfree} = 100-$pu;
|
||||
|
Loading…
Reference in New Issue
Block a user