+ Fix #256
This commit is contained in:
parent
1f57b2301d
commit
4589df0b86
|
@ -129,11 +129,11 @@ sub get_default_warning_threshold {
|
||||||
|
|
||||||
my $value = $result->{entSensorThresholdValue} * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision})));
|
my $value = $result->{entSensorThresholdValue} * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision})));
|
||||||
if ($result->{entSensorThresholdRelation} eq 'greaterOrEqual') {
|
if ($result->{entSensorThresholdRelation} eq 'greaterOrEqual') {
|
||||||
$high_th = $value - 0.01;
|
$high_th = $value - (1 * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision}))));
|
||||||
} elsif ($result->{entSensorThresholdRelation} eq 'greaterThan') {
|
} elsif ($result->{entSensorThresholdRelation} eq 'greaterThan') {
|
||||||
$high_th = $value;
|
$high_th = $value;
|
||||||
} elsif ($result->{entSensorThresholdRelation} eq 'lessOrEqual') {
|
} elsif ($result->{entSensorThresholdRelation} eq 'lessOrEqual') {
|
||||||
$low_th = $value + 0.01;
|
$low_th = $value + (1 * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision}))));
|
||||||
} elsif ($result->{entSensorThresholdRelation} eq 'lessThan') {
|
} elsif ($result->{entSensorThresholdRelation} eq 'lessThan') {
|
||||||
$low_th = $value;
|
$low_th = $value;
|
||||||
}
|
}
|
||||||
|
@ -157,11 +157,11 @@ sub get_default_critical_threshold {
|
||||||
|
|
||||||
my $value = $result->{entSensorThresholdValue} * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision})));
|
my $value = $result->{entSensorThresholdValue} * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision})));
|
||||||
if ($result->{entSensorThresholdRelation} eq 'greaterOrEqual') {
|
if ($result->{entSensorThresholdRelation} eq 'greaterOrEqual') {
|
||||||
$high_th = $value - 0.01;
|
$high_th = $value - (1 * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision}))));
|
||||||
} elsif ($result->{entSensorThresholdRelation} eq 'greaterThan') {
|
} elsif ($result->{entSensorThresholdRelation} eq 'greaterThan') {
|
||||||
$high_th = $value;
|
$high_th = $value;
|
||||||
} elsif ($result->{entSensorThresholdRelation} eq 'lessOrEqual') {
|
} elsif ($result->{entSensorThresholdRelation} eq 'lessOrEqual') {
|
||||||
$low_th = $value + 0.01;
|
$low_th = $value + (1 * (10 ** ($options{result}->{entSensorScale}) * (10 ** -($options{result}->{entSensorPrecision}))));
|
||||||
} elsif ($result->{entSensorThresholdRelation} eq 'lessThan') {
|
} elsif ($result->{entSensorThresholdRelation} eq 'lessThan') {
|
||||||
$low_th = $value;
|
$low_th = $value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue