From ed1db7609400e7726b034444f508b905b673d804 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Mon, 5 Dec 2022 14:49:44 +0000 Subject: [PATCH] (plugin) os::aix::local - mode list-storages fix parsing with a ssh banner (#4088) --- centreon-plugins/os/aix/local/mode/liststorages.pm | 2 +- centreon-plugins/os/aix/local/mode/storage.pm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/centreon-plugins/os/aix/local/mode/liststorages.pm b/centreon-plugins/os/aix/local/mode/liststorages.pm index 0f7e7b5b0..ed0de1fa3 100644 --- a/centreon-plugins/os/aix/local/mode/liststorages.pm +++ b/centreon-plugins/os/aix/local/mode/liststorages.pm @@ -56,7 +56,7 @@ sub manage_selection { # Header not needed shift @lines; foreach my $line (@lines) { - next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/); + next if ($line !~ /^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)/); my ($fs, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6); if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' && diff --git a/centreon-plugins/os/aix/local/mode/storage.pm b/centreon-plugins/os/aix/local/mode/storage.pm index e894f56e8..bf9143fcc 100644 --- a/centreon-plugins/os/aix/local/mode/storage.pm +++ b/centreon-plugins/os/aix/local/mode/storage.pm @@ -117,7 +117,7 @@ sub manage_selection { # Header not needed shift @lines; foreach my $line (@lines) { - next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/); + next if ($line !~ /^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)/); my ($fs, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6); next if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' && @@ -125,7 +125,6 @@ sub manage_selection { next if (defined($self->{option_results}->{filter_mount}) && $self->{option_results}->{filter_mount} ne '' && $mount !~ /$self->{option_results}->{filter_mount}/); - next if ($size !~ /^\d+$/ || $used !~ /^\d+$/ || $available !~ /^\d+$/); next if ($size == 0); $size = $size * 1024;