mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
enh(core): counter template - can use negative and float values for min/max (#3266)
This commit is contained in:
parent
60861e74fd
commit
889d2729e3
@ -195,13 +195,13 @@ sub perfdata {
|
|||||||
$template = $perf->{template} if (defined($perf->{template}));
|
$template = $perf->{template} if (defined($perf->{template}));
|
||||||
$label = $perf->{label} if (defined($perf->{label}));
|
$label = $perf->{label} if (defined($perf->{label}));
|
||||||
if (defined($perf->{min})) {
|
if (defined($perf->{min})) {
|
||||||
$min = ($perf->{min} =~ /[^0-9]/) ? $self->{result_values}->{$perf->{min}} : $perf->{min};
|
$min = ($perf->{min} =~ /[^0-9.-]/) ? $self->{result_values}->{$perf->{min}} : $perf->{min};
|
||||||
}
|
}
|
||||||
if (defined($perf->{max})) {
|
if (defined($perf->{max})) {
|
||||||
$max = ($perf->{max} =~ /[^0-9]/) ? $self->{result_values}->{$perf->{max}} : $perf->{max};
|
$max = ($perf->{max} =~ /[^0-9.-]/) ? $self->{result_values}->{$perf->{max}} : $perf->{max};
|
||||||
}
|
}
|
||||||
if (defined($perf->{threshold_total})) {
|
if (defined($perf->{threshold_total})) {
|
||||||
$th_total = ($perf->{threshold_total} =~ /[^0-9]/) ? $self->{result_values}->{$perf->{threshold_total}} : $perf->{threshold_total};
|
$th_total = ($perf->{threshold_total} =~ /[^0-9.-]/) ? $self->{result_values}->{$perf->{threshold_total}} : $perf->{threshold_total};
|
||||||
}
|
}
|
||||||
|
|
||||||
my $instances;
|
my $instances;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user