+ fix typo threshold (sub)
This commit is contained in:
parent
dc7bca19b6
commit
33e3ba5054
|
@ -48,18 +48,18 @@ sub new {
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_treshold_overload {
|
sub check_threshold_overload {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
$self->{overload_th} = {};
|
$self->{overload_th} = {};
|
||||||
foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
|
foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
|
||||||
if ($val !~ /(.*?)=(.*)/) {
|
if ($val !~ /(.*?)=(.*)/) {
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong treshold-overload option '" . $val . "'.");
|
$self->{output}->add_option_msg(short_msg => "Wrong threshold-overload option '" . $val . "'.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
my ($filter, $threshold) = ($1, $2);
|
my ($filter, $threshold) = ($1, $2);
|
||||||
if ($self->{output}->is_litteral_status(status => $threshold) == 0) {
|
if ($self->{output}->is_litteral_status(status => $threshold) == 0) {
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong treshold-overload status '" . $val . "'.");
|
$self->{output}->add_option_msg(short_msg => "Wrong threshold-overload status '" . $val . "'.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
$self->{overload_th}->{$filter} = $threshold;
|
$self->{overload_th}->{$filter} = $threshold;
|
||||||
|
@ -69,7 +69,7 @@ sub check_treshold_overload {
|
||||||
sub check_options {
|
sub check_options {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
$self->SUPER::init(%options);
|
$self->SUPER::init(%options);
|
||||||
$self->check_treshold_overload();
|
$self->check_threshold_overload();
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_severity {
|
sub get_severity {
|
||||||
|
@ -118,4 +118,4 @@ Example: --threshold-overload='(unknown|non critical)=critical'
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue