fix postgres tablespace + indent

This commit is contained in:
garnier-quentin 2020-09-15 10:23:59 +02:00
parent d27df860ea
commit 053f92470a
2 changed files with 7 additions and 7 deletions

View File

@ -371,9 +371,9 @@ disk-status:
=over 4
[unknown] %{disk_status} =~ /dunknown/i'
[unknown] %{disk_status} =~ /dunknown/i
[warning] %{disk_status} =~ /attaching|detaching|negotiating/i'
[warning] %{disk_status} =~ /attaching|detaching|negotiating/i
[critical] %{disk_status} =~ /outdated|inconsistent|failed|diskless/i

View File

@ -70,16 +70,16 @@ sub manage_selection {
$options{sql}->query(query => 'SELECT spcname, pg_tablespace_size(spcname) FROM pg_tablespace');
$self->{tablespaces} = {};
while (my $row = $options{sql}->fetchrow_array()) {
while (my @row = $options{sql}->fetchrow_array()) {
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
$row->[0] !~ /$self->{option_results}->{filter_name}/) {
$row[0] !~ /$self->{option_results}->{filter_name}/) {
$self->{output}->output_add(long_msg => "skipping tablespace '" . $row->[0] . "': no matching filter.", debug => 1);
next;
}
$self->{tablespaces}->{ $row->[0] } = {
display => $row->[0],
space_used => $row->[1]
$self->{tablespaces}->{ $row[0] } = {
display => $row[0],
space_used => $row[1]
};
}
}