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};
|
||||
$label =~ s/-/_/g;
|
||||
if (defined($self->{instance_mode}->{option_results}->{ok_status}) && $self->{instance_mode}->{option_results}->{ok_status} ne '' &&
|
||||
eval "$self->{instance_mode}->{option_results}->{ok_status}") {
|
||||
if (defined($self->{instance_mode}->{option_results}->{'ok_' . $label}) && $self->{instance_mode}->{option_results}->{'ok_' . $label} ne '' &&
|
||||
eval "$self->{instance_mode}->{option_results}->{'ok_' . $label}") {
|
||||
$status = 'ok';
|
||||
} 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}") {
|
||||
$status = 'critical';
|
||||
} 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';
|
||||
} 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';
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue