[pkg-ntp-maintainers] Bug#848690: Addition of `limited' to default ntp.conf breaks Nagios NTP plugin

Stuart Bennett sb476 at cam.ac.uk
Mon Dec 19 14:45:16 UTC 2016


Package: ntp
Version: 1:4.2.8p4+dfsg-3
File: /etc/ntp.conf

The addition of `limited' to the default ntp.conf in 1:4.2.8p3+dfsg-1
( https://anonscm.debian.org/viewvc/pkg-ntp?view=revision&revision=406 ) 
results in the check_ntp_time plugin from the monitoring-plugins-basic 
package (2.1.2-2~bpo8+1) failing consistently with the status `NTP 
CRITICAL: Offset unknown|', when run on a different host from the 
rate-limited server (using localhost seems to bypass the rate-limit).

This may be verified without configuring a whole Nagios installation by 
executing the plugin manually, as seen below.

Server `ntpserv' configured without `limited', command run on host 
`ntpclient':
ntpclient$ /usr/lib/nagios/plugins/check_ntp_time -H ntpserv -v
sending request to peer 0
response from peer 0: offset 0.0002608299255
sending request to peer 0
response from peer 0: offset 0.0002644062042
sending request to peer 0
response from peer 0: offset 0.000328540802
sending request to peer 0
response from peer 0: offset 0.00033390522
overall average offset: 0.0002969205379
NTP OK: Offset 0.0002969205379 secs|offset=0.000297s;60.000000;120.000000;

Server `ntpserv' configured with `limited', command run on host `ntpclient':
ntpclient$ /usr/lib/nagios/plugins/check_ntp_time -H ntpserv -v
sending request to peer 0
response from peer 0: offset 0.000293970108
sending request to peer 0
response from peer 0: offset -0.0003185272217
sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
re-sending request to peer 0
discarding peer 0: stratum=0
overall average offset: 0
NTP CRITICAL: Offset unknown|

Arguably monitoring-plugins-basic is broken, hitting the NTP server four 
times in <20ms, but can the default rate limiting parameters be adapted 
to cope with this?  I've found that adding `discard minimum 1', as 
mentioned in #678955, is an adequate setting.

Stuart



More information about the pkg-ntp-maintainers mailing list