fix vacuum postgres

This commit is contained in:
garnier-quentin 2020-09-10 14:00:01 +02:00
parent 3d9e702fa0
commit 043561ba9f
2 changed files with 7 additions and 8 deletions

View File

@ -30,11 +30,10 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{ 'warning:s' => { name => 'warning', default => '' },
"warning:s" => { name => 'warning', default => ''}, 'critical:s' => { name => 'critical', default => '' },
"critical:s" => { name => 'critical', default => ''}, 'tablespace:s' => { name => 'tablespace' } # tablespace name to check
"tablespace:s" => { name => 'tablespace', }, # tablespace name to check
}); });
return $self; return $self;

View File

@ -48,7 +48,7 @@ sub check_options {
} }
if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { 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}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
self->{output}->option_exit(); $self->{output}->option_exit();
} }
} }