[Nagiosplug-devel] check_ntp (nagios-plugins 1.3.1) 1.14.2.3 offset 0

Subhendu Ghosh sghosh at sghosh.org
Wed Oct 15 07:08:03 CEST 2003


On Tue, 14 Oct 2003, Dmitry Sazonov wrote:

> 
> When checking yourself offset is usually 0. That should not trigger CRITICAL event.
> 
> 
> CVS view:
> 
> 202 sghosh      1.4  
> 203                  		# An offset of 0.000000 with an error is probably bogus. Actually,
> 204                  		# it's probably always bogus, but let's be paranoid here.
> 205                  		if ($offset == 0) { undef $offset;}
> 206                  
> 207                  		$ntpdate_error = defined ($offset) ? $ERRORS{"OK"} : $ERRORS{"CRITICAL"};
> 208                  		print "ntperr = $ntpdate_error \n" if $verbose;
> 
> 
> 

I guess we thought of using it on remote hosts only although I have 
seen offsets of 0.000001 at least when run against localhost.

checking localtime against localtime seemed silly.

Probably should check to make sure stratum != 0 or stratum != 16

feel like writing a patch ;)
-- 
-sg





More information about the Devel mailing list