+ Ref #125 : some typo fix
This commit is contained in:
parent
dc4477a3bd
commit
3dbbb1c8d5
|
@ -108,8 +108,6 @@ sub check_options {
|
||||||
$self->{overload_th}->{$section} = [] if (!defined($self->{overload_th}->{$section}));
|
$self->{overload_th}->{$section} = [] if (!defined($self->{overload_th}->{$section}));
|
||||||
push @{$self->{overload_th}->{$section}}, {filter => $filter, status => $status, instance => $instance };
|
push @{$self->{overload_th}->{$section}}, {filter => $filter, status => $status, instance => $instance };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
|
@ -149,7 +147,6 @@ sub run {
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
$self->{output}->exit();
|
$self->{output}->exit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_filter {
|
sub check_filter {
|
||||||
|
|
|
@ -60,7 +60,6 @@ sub check_options {
|
||||||
$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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
|
@ -85,20 +84,17 @@ sub run {
|
||||||
|
|
||||||
|
|
||||||
my $exit = $self->{perfdata}->threshold_check(value => $details->{'percent-endurance-remaining'},
|
my $exit = $self->{perfdata}->threshold_check(value => $details->{'percent-endurance-remaining'},
|
||||||
threshold => [ { label => 'warning', 'exit_litteral' => 'warning' }, { label => 'critical', exit_litteral => 'critical' } ]);
|
threshold => [ { label => 'warning', exit_litteral => 'warning' }, { label => 'critical', exit_litteral => 'critical' } ]);
|
||||||
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->perfdata_add(label => $item."_endurance",
|
|
||||||
value => $details->{'percent-endurance-remaining'},
|
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
|
|
||||||
min => 0, max => 100);
|
|
||||||
|
|
||||||
if ($exit ne 'ok') {
|
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(severity => $exit,
|
||||||
short_msg => sprintf("SSD '%s' endurance is %i%%",
|
short_msg => sprintf("SSD '%s' endurance is %i%%",
|
||||||
$item, $details->{'percent-endurance-remaining'}));
|
$item, $details->{'percent-endurance-remaining'}));
|
||||||
}
|
}
|
||||||
|
$self->{output}->perfdata_add(label => $item . "_endurance", unit => '%',
|
||||||
|
value => $details->{'percent-endurance-remaining'},
|
||||||
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
||||||
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
|
||||||
|
min => 0, max => 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
|
|
|
@ -64,7 +64,6 @@ sub check_options {
|
||||||
$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();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($self->{perfdata}->threshold_validate(label => 'warning-read', value => $self->{option_results}->{warning_read})) == 0) {
|
if (($self->{perfdata}->threshold_validate(label => 'warning-read', value => $self->{option_results}->{warning_read})) == 0) {
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong warning-read threshold '" . $self->{option_results}->{warning_read} . "'.");
|
$self->{output}->add_option_msg(short_msg => "Wrong warning-read threshold '" . $self->{option_results}->{warning_read} . "'.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
|
@ -82,8 +81,6 @@ sub check_options {
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong critical-write threshold '" . $self->{option_results}->{critical_write} . "'.");
|
$self->{output}->add_option_msg(short_msg => "Wrong critical-write threshold '" . $self->{option_results}->{critical_write} . "'.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
|
|
|
@ -60,7 +60,6 @@ sub check_options {
|
||||||
$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();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
|
@ -86,20 +85,17 @@ sub run {
|
||||||
|
|
||||||
|
|
||||||
my $exit = $self->{perfdata}->threshold_check(value => $details->{'cpu-usage'}, threshold => [ { label => 'warning', 'exit_litteral' => 'warning' }, { label => 'critical', exit_litteral => 'critical' } ]);
|
my $exit = $self->{perfdata}->threshold_check(value => $details->{'cpu-usage'}, threshold => [ { label => 'warning', 'exit_litteral' => 'warning' }, { label => 'critical', exit_litteral => 'critical' } ]);
|
||||||
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->perfdata_add(label => 'cpu_'.$item,
|
|
||||||
value => $details->{'cpu-usage'},
|
|
||||||
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
|
||||||
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
|
|
||||||
min => 0, max => 100);
|
|
||||||
|
|
||||||
if ($exit ne 'ok') {
|
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(severity => $exit,
|
||||||
short_msg => sprintf("Xenvs '%s' cpu-Usage is %i%%",
|
short_msg => sprintf("Xenvs '%s' cpu-Usage is %i%%",
|
||||||
$item,
|
$item,
|
||||||
$details->{'cpu-usage'}));
|
$details->{'cpu-usage'}));
|
||||||
}
|
}
|
||||||
|
$self->{output}->perfdata_add(label => 'cpu_' . $item, unit => '%',
|
||||||
|
value => $details->{'cpu-usage'},
|
||||||
|
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),
|
||||||
|
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),
|
||||||
|
min => 0, max => 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
|
|
|
@ -84,7 +84,6 @@ sub check_options {
|
||||||
$self->{overload_th}->{$section} = [] if (!defined($self->{overload_th}->{$section}));
|
$self->{overload_th}->{$section} = [] if (!defined($self->{overload_th}->{$section}));
|
||||||
push @{$self->{overload_th}->{$section}}, {filter => $filter, status => $status, instance => $instance };
|
push @{$self->{overload_th}->{$section}}, {filter => $filter, status => $status, instance => $instance };
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
|
@ -119,7 +118,6 @@ sub run {
|
||||||
|
|
||||||
$self->{output}->display();
|
$self->{output}->display();
|
||||||
$self->{output}->exit();
|
$self->{output}->exit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_filter {
|
sub check_filter {
|
||||||
|
|
Loading…
Reference in New Issue