Comment 0 for bug 1367791

Revision history for this message
David Moreau Simard (dmsimard) wrote : check_ntp_time fails when peer reports stratum 0

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|

=====

# /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