fix catalog_status_threshold
This commit is contained in:
parent
d3aaad0bb3
commit
4aae329d78
|
@ -38,17 +38,17 @@ sub catalog_status_threshold {
|
||||||
|
|
||||||
my $label = $self->{label};
|
my $label = $self->{label};
|
||||||
$label =~ s/-/_/g;
|
$label =~ s/-/_/g;
|
||||||
if (defined($self->{instance_mode}->{option_results}->{ok_status}) && $self->{instance_mode}->{option_results}->{ok_status} ne '' &&
|
if (defined($self->{instance_mode}->{option_results}->{'ok_' . $label}) && $self->{instance_mode}->{option_results}->{'ok_' . $label} ne '' &&
|
||||||
eval "$self->{instance_mode}->{option_results}->{ok_status}") {
|
eval "$self->{instance_mode}->{option_results}->{'ok_' . $label}") {
|
||||||
$status = 'ok';
|
$status = 'ok';
|
||||||
} elsif (defined($self->{instance_mode}->{option_results}->{'critical_' . $label}) && $self->{instance_mode}->{option_results}->{'critical_' . $label} ne '' &&
|
} elsif (defined($self->{instance_mode}->{option_results}->{'critical_' . $label}) && $self->{instance_mode}->{option_results}->{'critical_' . $label} ne '' &&
|
||||||
eval "$self->{instance_mode}->{option_results}->{'critical_' . $label}") {
|
eval "$self->{instance_mode}->{option_results}->{'critical_' . $label}") {
|
||||||
$status = 'critical';
|
$status = 'critical';
|
||||||
} elsif (defined($self->{instance_mode}->{option_results}->{'warning_' . $label}) && $self->{instance_mode}->{option_results}->{'warning_' . $label} ne '' &&
|
} elsif (defined($self->{instance_mode}->{option_results}->{'warning_' . $label}) && $self->{instance_mode}->{option_results}->{'warning_' . $label} ne '' &&
|
||||||
eval "$self->{instance_mode}->{option_results}->{'warning_' . $label}") {
|
eval "$self->{instance_mode}->{option_results}->{'warning_' . $label}") {
|
||||||
$status = 'warning';
|
$status = 'warning';
|
||||||
} elsif (defined($self->{instance_mode}->{option_results}->{'unknown_' . $label}) && $self->{instance_mode}->{option_results}->{'unknown_' . $label} ne '' &&
|
} elsif (defined($self->{instance_mode}->{option_results}->{'unknown_' . $label}) && $self->{instance_mode}->{option_results}->{'unknown_' . $label} ne '' &&
|
||||||
eval "$self->{instance_mode}->{option_results}->{'unknown_' . $label}") {
|
eval "$self->{instance_mode}->{option_results}->{'unknown_' . $label}") {
|
||||||
$status = 'unknown';
|
$status = 'unknown';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue