cisco sensor: manage when threshold low and high are the same
This commit is contained in:
parent
11fd902671
commit
18b41ae807
|
@ -140,6 +140,10 @@ sub get_default_warning_threshold {
|
|||
}
|
||||
}
|
||||
|
||||
# when it's the same value. Means no threshold.
|
||||
if (defined($low_th) && defined($high_th) && $high_th < $low_th) {
|
||||
return '';
|
||||
}
|
||||
my $th = '';
|
||||
$th = centreon::plugins::misc::expand_exponential(value => $low_th) . ':' if (defined($low_th));
|
||||
$th .= centreon::plugins::misc::expand_exponential(value => $high_th) if (defined($high_th));
|
||||
|
@ -169,6 +173,10 @@ sub get_default_critical_threshold {
|
|||
}
|
||||
}
|
||||
|
||||
# when it's the same value. Means no threshold.
|
||||
if (defined($low_th) && defined($high_th) && $high_th < $low_th) {
|
||||
return '';
|
||||
}
|
||||
my $th = '';
|
||||
$th = centreon::plugins::misc::expand_exponential(value => $low_th) . ':' if (defined($low_th));
|
||||
$th .= centreon::plugins::misc::expand_exponential(value => $high_th) if (defined($high_th));
|
||||
|
|
Loading…
Reference in New Issue