NTP:Offset Unknown

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ffolse
Posts: 10
Joined: Wed Jan 21, 2015 1:54 pm

NTP:Offset Unknown

Post by ffolse »

Hello,

I have a couple of servers that are reporting Critical NTP :Offset Unknown when doing a check on the time Offset.
Here is the output of a check:

[nagios@nagios01 libexec]# ./check_ntp_time -H HOST1 -w 30 -c 60 -v
sending request to peer 0
response from peer 0: offset 0.00245475769
sending request to peer 0
response from peer 0: offset 0.002401947975
sending request to peer 0
response from peer 0: offset 0.002385854721
sending request to peer 0
response from peer 0: offset 0.002425789833
discarding peer 0: stratum=0
overall average offset: 0
NTP CRITICAL: Offset unknown|

NTP server is running correctly.
Version:
check_ntp_time v2.0.3 (nagios-plugins 2.0.3)


thanks,
lf
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NTP:Offset Unknown

Post by Box293 »

Can you please run the command again but with the very verbose flag "-vv"

Code: Select all

./check_ntp_time -H HOST1 -w 30 -c 60 -vv
This will generate a bit more output.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ffolse
Posts: 10
Joined: Wed Jan 21, 2015 1:54 pm

Re: NTP:Offset Unknown

Post by ffolse »

[nagios@nagios01 libexec]# ./check_ntp_time -H HOST1 -w 30 -c 60 -vv
Found 1 peers to check
sending request to peer 0
response from peer 0: packet contents:
flags: 0x24
li=0 (0x00)
vn=4 (0x20)
mode=4 (0x04)
stratum = 0
poll = 16
precision = 9.53674e-07
rtdelay = 0
rtdisp = 0.0011749267578125
refid = 50455453
refts = 1428361388.75213
origts = 1428361354.524066
rxts = 1428361388.752067
txts = 1428361388.75213
offset 34.2276473
sending request to peer 0
response from peer 0: packet contents:
flags: 0x24
li=0 (0x00)
vn=4 (0x20)
mode=4 (0x04)
stratum = 0
poll = 16
precision = 9.53674e-07
rtdelay = 0
rtdisp = 0.0011749267578125
refid = 50455453
refts = 1428361388.752629
origts = 1428361354.524912
rxts = 1428361388.752612
txts = 1428361388.75263
offset 34.2275306
sending request to peer 0
response from peer 0: packet contents:
flags: 0x24
li=0 (0x00)
vn=4 (0x20)
mode=4 (0x04)
stratum = 0
poll = 16
precision = 9.53674e-07
rtdelay = 0
rtdisp = 0.0011749267578125
refid = 50455453
refts = 1428361388.753036
origts = 1428361354.525315
rxts = 1428361388.753021
txts = 1428361388.753036
offset 34.22754467
sending request to peer 0
response from peer 0: packet contents:
flags: 0x24
li=0 (0x00)
vn=4 (0x20)
mode=4 (0x04)
stratum = 0
poll = 16
precision = 9.53674e-07
rtdelay = 0
rtdisp = 0.0011749267578125
refid = 50455453
refts = 1428361388.753419
origts = 1428361354.525699
rxts = 1428361388.753405
txts = 1428361388.753419
offset 34.22754514
discarding peer 0: stratum=0
no peers meeting synchronization criteria :(
overall average offset: 0
NTP CRITICAL: Offset unknown

Thanks,
LF
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NTP:Offset Unknown

Post by Box293 »

I think I found the answer here:

http://serverfault.com/questions/625027 ... et-unknown
The key line here is this one:

Code: Select all

discarding peer 0: stratum=0
An NTP server identifying itself as stratum 0 is a violation of the spec (it's reserved for atomic clocks or something like that). I had this problem years ago with some BSD and Mac OS X hosts. I ended up hacking the stratum check out of the source and maintaining a separate build of the plugin for "problematic" hosts.

The offending lines are 254-257 (currently, anyway), if you want to rip that out. It's a hack, but it works for me ;-)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked