diff --git a/centreon-plugins/database/oracle/mode/rmanbackupage.pm b/centreon-plugins/database/oracle/mode/rmanbackupage.pm index dd72b406c..2bd42d0b8 100644 --- a/centreon-plugins/database/oracle/mode/rmanbackupage.pm +++ b/centreon-plugins/database/oracle/mode/rmanbackupage.pm @@ -81,7 +81,7 @@ sub check_options { } } - if (defined($self->{option_results}->{timezone})) { + if (defined($self->{option_results}->{timezone}) && $self->{option_results}->{timezone} ne '') { $ENV{TZ} = $self->{option_results}->{timezone}; } } @@ -141,7 +141,7 @@ sub run { warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $label), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $label), min => 0); - my $exit_code = $self->{perfdata}->threshold_check(value => $backup_age, threshold => [ { label => 'critical-' . $label, 'exit_litteral' => 'critical' }, { label => 'warning-' . $label, exit_litteral => 'warning' } ]); + my $exit_code = $self->{perfdata}->threshold_check(value => $backup_age, threshold => [ { label => 'critical-' . $label, exit_litteral => 'critical' }, { label => 'warning-' . $label, exit_litteral => 'warning' } ]); if (!$self->{output}->is_status(value => $exit_code, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit_code, diff --git a/centreon-plugins/database/oracle/mode/rmanbackupproblems.pm b/centreon-plugins/database/oracle/mode/rmanbackupproblems.pm index 55c5e44b4..9d07ba507 100644 --- a/centreon-plugins/database/oracle/mode/rmanbackupproblems.pm +++ b/centreon-plugins/database/oracle/mode/rmanbackupproblems.pm @@ -81,7 +81,7 @@ sub run { $self->{sql}->query(query => $query); my $rman_backup_problems = $self->{sql}->fetchrow_array(); - my $exit_code = $self->{perfdata}->threshold_check(value => $rman_backup_problems, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); + my $exit_code = $self->{perfdata}->threshold_check(value => $rman_backup_problems, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit_code, short_msg => sprintf("rman had %i problems during the last %i days", $rman_backup_problems, $self->{option_results}->{retention})); $self->{output}->perfdata_add(label => 'rman_backup_problems', diff --git a/centreon-plugins/database/oracle/mode/rmanonlinebackupage.pm b/centreon-plugins/database/oracle/mode/rmanonlinebackupage.pm index def67637f..b6d4d1d59 100644 --- a/centreon-plugins/database/oracle/mode/rmanonlinebackupage.pm +++ b/centreon-plugins/database/oracle/mode/rmanonlinebackupage.pm @@ -70,7 +70,7 @@ sub check_options { $self->{output}->option_exit(); } - if (defined($self->{option_results}->{timezone})) { + if (defined($self->{option_results}->{timezone}) && $self->{option_results}->{timezone} ne '') { $ENV{TZ} = $self->{option_results}->{timezone}; } }