+ Fix ntp protocol plugin mode offset

This commit is contained in:
garnier-quentin 2016-04-19 20:16:44 +02:00
parent 36648734a6
commit 63ee930b70
1 changed files with 1 additions and 1 deletions

View File

@ -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' } ]);