Public bug reported:

Lots of reference reading:
- http://serverfault.com/questions/625027/nagios-check-ntp-time-offset-unknown
- http://serverfault.com/questions/269701/nagios-ntp-discarding-peer
- http://sourceforge.net/p/nagiosplug/mailman/message/24582375/

Using this check on more than a hundred servers configured similarly, the check 
fails like so on just a few nodes (<5):
sending request to peer 0
response from peer 0: offset -0.08336162567
sending request to peer 0
response from peer 0: offset -0.08346772194
sending request to peer 0
response from peer 0: offset -0.08303678036
sending request to peer 0
response from peer 0: offset -0.08342885971
discarding peer 0: stratum=0
overall average offset: 0
NTP CRITICAL: Offset unknown|

=====

##
# Monitoring node
## 
# /usr/lib/nagios/plugins/check_ntp_time -V
check_ntp_time v1.5 (nagios-plugins 1.5)

# dpkg -l |grep nagios-plugins
ii  nagios-plugins                       1.5-3ubuntu1                  all      
    Plugins for nagios compatible monitoring systems (metapackage)
ii  nagios-plugins-basic                 1.5-3ubuntu1                  amd64    
    Plugins for nagios compatible monitoring systems
ii  nagios-plugins-common                1.5-3ubuntu1                  amd64    
    Common files for plugins for nagios compatible monitoring
ii  nagios-plugins-standard              1.5-3ubuntu1                  amd64    
    Plugins for nagios compatible monitoring systems

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

# uname -a
Linux node01 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 
x86_64 x86_64 x86_64 GNU/Linux

# ntpq -c rv
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349-o Wed Oct  9 19:08:06 UTC 2013 (1)",
processor="x86_64", system="Linux/3.13.0-24-generic", leap=00, stratum=3,
precision=-21, rootdelay=92.244, rootdisp=76.080, refid=91.189.94.4,
reftime=d7bae397.935fbf98  Wed, Sep 10 2014 10:49:59.575,
clock=d7bae3ec.1dd1b78d  Wed, Sep 10 2014 10:51:24.116, peer=29730, tc=7,
mintc=3, offset=0.334, frequency=-10.289, sys_jitter=0.508,
clk_jitter=0.803, clk_wander=0.047

# On the ntp peer client (monitored server):
# ntpq -c rv
associd=0 status=c012 leap_alarm, sync_unspec, 1 event, freq_set,
version="ntpd 4.2.6p3@1.2290-o Tue Jun  5 20:12:08 UTC 2012 (1)",
processor="x86_64", system="Linux/3.5.0-23-generic", leap=11, stratum=16,
precision=-19, rootdelay=0.000, rootdisp=27.810, refid=INIT,
reftime=00000000.00000000  Mon, Jan  1 1900  0:00:00.000,
clock=d7bae3d4.d1ed6996  Wed, Sep 10 2014 14:51:00.820, peer=0, tc=3,
mintc=3, offset=0.000, frequency=-0.600, sys_jitter=0.000,
clk_jitter=0.002, clk_wander=0.000

** Affects: nagios-plugins (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

- check_ntp_time fails when peer reports stratum 0
+ check_ntp_time returns unknown with peer reporting stratum 0

** Description changed:

  Lots of reference reading:
  - http://serverfault.com/questions/625027/nagios-check-ntp-time-offset-unknown
  - http://serverfault.com/questions/269701/nagios-ntp-discarding-peer
  - http://sourceforge.net/p/nagiosplug/mailman/message/24582375/
  
  Using this check on more than a hundred servers configured similarly, the 
check fails like so on just a few nodes (<5):
  sending request to peer 0
  response from peer 0: offset -0.08336162567
  sending request to peer 0
  response from peer 0: offset -0.08346772194
  sending request to peer 0
  response from peer 0: offset -0.08303678036
  sending request to peer 0
  response from peer 0: offset -0.08342885971
  discarding peer 0: stratum=0
  overall average offset: 0
  NTP CRITICAL: Offset unknown|
  
  =====
  
+ ##
+ # Monitoring node
+ ## 
  # /usr/lib/nagios/plugins/check_ntp_time -V
  check_ntp_time v1.5 (nagios-plugins 1.5)
  
  # dpkg -l |grep nagios-plugins
  ii  nagios-plugins                       1.5-3ubuntu1                  all    
      Plugins for nagios compatible monitoring systems (metapackage)
  ii  nagios-plugins-basic                 1.5-3ubuntu1                  amd64  
      Plugins for nagios compatible monitoring systems
  ii  nagios-plugins-common                1.5-3ubuntu1                  amd64  
      Common files for plugins for nagios compatible monitoring
  ii  nagios-plugins-standard              1.5-3ubuntu1                  amd64  
      Plugins for nagios compatible monitoring systems
  
  # cat /etc/lsb-release
  DISTRIB_ID=Ubuntu
  DISTRIB_RELEASE=14.04
  DISTRIB_CODENAME=trusty
  DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
  
  # uname -a
  Linux node01 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 
x86_64 x86_64 x86_64 GNU/Linux
+ 
+ # ntpq -c rv
+ associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
+ version="ntpd 4.2.6p5@1.2349-o Wed Oct  9 19:08:06 UTC 2013 (1)",
+ processor="x86_64", system="Linux/3.13.0-24-generic", leap=00, stratum=3,
+ precision=-21, rootdelay=92.244, rootdisp=76.080, refid=91.189.94.4,
+ reftime=d7bae397.935fbf98  Wed, Sep 10 2014 10:49:59.575,
+ clock=d7bae3ec.1dd1b78d  Wed, Sep 10 2014 10:51:24.116, peer=29730, tc=7,
+ mintc=3, offset=0.334, frequency=-10.289, sys_jitter=0.508,
+ clk_jitter=0.803, clk_wander=0.047
+ 
+ # On the ntp peer client (monitored server):
+ # ntpq -c rv
+ associd=0 status=c012 leap_alarm, sync_unspec, 1 event, freq_set,
+ version="ntpd 4.2.6p3@1.2290-o Tue Jun  5 20:12:08 UTC 2012 (1)",
+ processor="x86_64", system="Linux/3.5.0-23-generic", leap=11, stratum=16,
+ precision=-19, rootdelay=0.000, rootdisp=27.810, refid=INIT,
+ reftime=00000000.00000000  Mon, Jan  1 1900  0:00:00.000,
+ clock=d7bae3d4.d1ed6996  Wed, Sep 10 2014 14:51:00.820, peer=0, tc=3,
+ mintc=3, offset=0.000, frequency=-0.600, sys_jitter=0.000,
+ clk_jitter=0.002, clk_wander=0.000

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nagios-plugins in Ubuntu.
https://bugs.launchpad.net/bugs/1367791

Title:
  check_ntp_time returns unknown with peer reporting stratum 0

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/1367791/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to