+ Fix list-storages plugin
This commit is contained in:
parent
3ac05c6a34
commit
825a5cc8f1
|
@ -60,17 +60,18 @@ sub check_options {
|
||||||
sub manage_selection {
|
sub manage_selection {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
my $stdout = centreon::plugins::misc::execute(output => $self->{output},
|
my ($stdout, $exit_code) = centreon::plugins::misc::execute(
|
||||||
options => $self->{option_results},
|
output => $self->{output},
|
||||||
sudo => $self->{option_results}->{sudo},
|
options => $self->{option_results},
|
||||||
command => $self->{option_results}->{command},
|
sudo => $self->{option_results}->{sudo},
|
||||||
command_path => $self->{option_results}->{command_path},
|
command => $self->{option_results}->{command},
|
||||||
command_options => $self->{option_results}->{command_options});
|
command_path => $self->{option_results}->{command_path},
|
||||||
|
command_options => $self->{option_results}->{command_options},
|
||||||
|
no_quit => 1
|
||||||
|
);
|
||||||
my @lines = split /\n/, $stdout;
|
my @lines = split /\n/, $stdout;
|
||||||
# Header not needed
|
|
||||||
shift @lines;
|
|
||||||
foreach my $line (@lines) {
|
foreach my $line (@lines) {
|
||||||
next if ($line !~ /^(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*)/);
|
next if ($line !~ /^(\S+)\s+(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(.*)/);
|
||||||
my ($fs, $type, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6, $7);
|
my ($fs, $type, $size, $used, $available, $percent, $mount) = ($1, $2, $3, $4, $5, $6, $7);
|
||||||
|
|
||||||
if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
|
if (defined($self->{option_results}->{filter_fs}) && $self->{option_results}->{filter_fs} ne '' &&
|
||||||
|
|
Loading…
Reference in New Issue