Problème avec la gestion des seuils

Bug: on comparait le timestamp avec les seuils alors qu'il faut comparer la différence (timestamp - localtime)
This commit is contained in:
Stéphane Duret 2016-04-26 09:04:09 +02:00
parent 23efe69fc3
commit 02602d226b
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ SELECT extract(epoch FROM now()) AS epok
}
my $diff = $result - $ltime;
my $exit_code = $self->{perfdata}->threshold_check(value => $result, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
my $exit_code = $self->{perfdata}->threshold_check(value => $diff, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
$self->{output}->output_add(severity => $exit_code,
short_msg => sprintf("%.3fs time diff between servers", $diff));