fix postgres tablespace + indent
This commit is contained in:
parent
d27df860ea
commit
053f92470a
|
@ -371,9 +371,9 @@ disk-status:
|
||||||
|
|
||||||
=over 4
|
=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
|
[critical] %{disk_status} =~ /outdated|inconsistent|failed|diskless/i
|
||||||
|
|
||||||
|
|
|
@ -70,16 +70,16 @@ sub manage_selection {
|
||||||
$options{sql}->query(query => 'SELECT spcname, pg_tablespace_size(spcname) FROM pg_tablespace');
|
$options{sql}->query(query => 'SELECT spcname, pg_tablespace_size(spcname) FROM pg_tablespace');
|
||||||
|
|
||||||
$self->{tablespaces} = {};
|
$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 '' &&
|
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);
|
$self->{output}->output_add(long_msg => "skipping tablespace '" . $row->[0] . "': no matching filter.", debug => 1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{tablespaces}->{ $row->[0] } = {
|
$self->{tablespaces}->{ $row[0] } = {
|
||||||
display => $row->[0],
|
display => $row[0],
|
||||||
space_used => $row->[1]
|
space_used => $row[1]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue