diff --git a/os/solaris/local/mode/hwraidctl.pm b/os/solaris/local/mode/hwraidctl.pm index 1ae8c7d20..01e961caa 100644 --- a/os/solaris/local/mode/hwraidctl.pm +++ b/os/solaris/local/mode/hwraidctl.pm @@ -117,7 +117,8 @@ sub run { } } - my ($exit_code) = check_threshold($volumes_errors, $OPTION{warning}, $OPTION{critical}); + my ($exit_code) = $self->{perfdata}->threshold_check(value => $volumes_errors, + threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); if ($volumes_errors > 0) { $self->{output}->output_add(severity => $exit_code, short_msg => sprintf("Some volumes problems:" . $volumes)); diff --git a/os/solaris/local/mode/prtdiag.pm b/os/solaris/local/mode/prtdiag.pm index 5a16e75bd..abb5e6035 100644 --- a/os/solaris/local/mode/prtdiag.pm +++ b/os/solaris/local/mode/prtdiag.pm @@ -61,7 +61,7 @@ sub new { "sudo" => { name => 'sudo' }, "command:s" => { name => 'command', default => 'prtdiag' }, "command-path:s" => { name => 'command_path', default => '/usr/platform/`/sbin/uname -i`/sbin' }, - "command-options:s" => { name => 'command_options', default => '-v 2&1' }, + "command-options:s" => { name => 'command_options', default => '-v 2>&1' }, "config-file:s" => { name => 'config_file' }, }); $self->{conf} = {}; @@ -266,6 +266,7 @@ sub prtdiag { sub run { my ($self, %options) = @_; + $self->load_prtdiag_config(); $self->prtdiag(); $self->{output}->display(); $self->{output}->exit(); diff --git a/os/solaris/local/mode/svmdisks.pm b/os/solaris/local/mode/svmdisks.pm index 70da0e56d..0df3d9313 100644 --- a/os/solaris/local/mode/svmdisks.pm +++ b/os/solaris/local/mode/svmdisks.pm @@ -160,11 +160,11 @@ sub run { my ($exit_code) = $self->{perfdata}->threshold_check(value => $num_metastat_errors, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); if ($num_metastat_errors > 0) { - output_add(severity => $exit_code, - short_msg => sprintf("Some metadevices need maintenance:" . $metastat_name)); + $self->{output}->output_add(severity => $exit_code, + short_msg => sprintf("Some metadevices need maintenance:" . $metastat_name)); } else { - output_add(severity => 'OK', - short_msg => "No problems on metadevices"); + $self->{output}->output_add(severity => 'OK', + short_msg => "No problems on metadevices"); } ($exit_code) = $self->{perfdata}->threshold_check(value => $num_metadb_errors,