From 63ee930b70ad3393990b53be792e75a8173d7bea Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 19 Apr 2016 20:16:44 +0200 Subject: [PATCH] + Fix ntp protocol plugin mode offset --- apps/protocols/ntp/mode/offset.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/protocols/ntp/mode/offset.pm b/apps/protocols/ntp/mode/offset.pm index 370cdb53f..600a48ffc 100644 --- a/apps/protocols/ntp/mode/offset.pm +++ b/apps/protocols/ntp/mode/offset.pm @@ -77,7 +77,7 @@ sub run { } my $localtime = time(); - my $offset = ($ntp{'Receive Timestamp'} - $ntp{'Originate Timestamp'}) + ($ntp{'Transmit Timestamp'} - $localtime) / 2); + my $offset = (($ntp{'Receive Timestamp'} - $ntp{'Originate Timestamp'}) + ($ntp{'Transmit Timestamp'} - $localtime)) / 2; my $exit = $self->{perfdata}->threshold_check(value => $offset, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);