diff --git a/centreon-plugins/database/postgres/mode/tablespace.pm b/centreon-plugins/database/postgres/mode/tablespace.pm index 978ed7376..7ea7b676f 100644 --- a/centreon-plugins/database/postgres/mode/tablespace.pm +++ b/centreon-plugins/database/postgres/mode/tablespace.pm @@ -30,12 +30,11 @@ sub new { my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; - $options{options}->add_options(arguments => - { - "warning:s" => { name => 'warning', default => ''}, - "critical:s" => { name => 'critical', default => ''}, - "tablespace:s" => { name => 'tablespace', }, # tablespace name to check - }); + $options{options}->add_options(arguments => { + 'warning:s' => { name => 'warning', default => '' }, + 'critical:s' => { name => 'critical', default => '' }, + 'tablespace:s' => { name => 'tablespace' } # tablespace name to check + }); return $self; } @@ -64,7 +63,7 @@ sub run { my $target_fields = undef; # Query to get tablespace size - my $query = sprintf("SELECT pg_tablespace_size('%s') FROM pg_tablespace LIMIT 1;",$self->{option_results}->{tablespace}); + my $query = sprintf("SELECT pg_tablespace_size('%s') FROM pg_tablespace LIMIT 1;", $self->{option_results}->{tablespace}); $self->{sql}->query(query => $query); my $result = $self->{sql}->fetchrow_array(); diff --git a/centreon-plugins/database/postgres/mode/vacuum.pm b/centreon-plugins/database/postgres/mode/vacuum.pm index 632f5e440..f83176ac9 100644 --- a/centreon-plugins/database/postgres/mode/vacuum.pm +++ b/centreon-plugins/database/postgres/mode/vacuum.pm @@ -48,7 +48,7 @@ sub check_options { } if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); - self->{output}->option_exit(); + $self->{output}->option_exit(); } }