From 02602d226b0fdf0a10ae67b44909483daf2b91a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duret?= Date: Tue, 26 Apr 2016 09:04:09 +0200 Subject: [PATCH] =?UTF-8?q?Probl=C3=A8me=20avec=20la=20gestion=20des=20seu?= =?UTF-8?q?ils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: on comparait le timestamp avec les seuils alors qu'il faut comparer la différence (timestamp - localtime) --- database/postgres/mode/timesync.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/postgres/mode/timesync.pm b/database/postgres/mode/timesync.pm index 2da789d90..94b3bb798 100644 --- a/database/postgres/mode/timesync.pm +++ b/database/postgres/mode/timesync.pm @@ -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));