[Nagiosplug-help] check_ntp

Andreas Ericsson ae at op5.se
Tue Nov 6 16:38:31 CET 2007


Richard Mohr wrote:
> On Mon, 2007-11-05 at 14:13 -0500, jmacaranas at fxdd.com wrote:
> 
>> Where does check_ntp gets the offset? How does it compute the value?  
> 
> I suppose the first question to ask is if you are using the C or perl
> version of check_ntp?
> 
> Looking at the perl plugin, it seems that check_ntp gets the offset by
> running "ntpdate -q host1".  I looked at the C version, and it seems
> that it might be doing something similar (although it computes the
> offset itself rather than calling ntpdate).
> 
>> Doing an check_ntp –H host1 shows an offset which is different to the
>> offset result of ntpdc –p host1
> 
> That would make sense.  If I remember correctly, ntpdc will tell you how
> much the remote server is offset from the peers it syncs with.  Running
> ntpdate shows the offset between the remote host and host you run the
> ntpdate command from.
> 
> Hmmm.  If my explanation is correct, then in my mind check_ntp is
> measuring the wrong offset.  I only care about how much the remote
> server differs from its peers, not how much it differs from my Nagios
> server.  Or maybe the plugin is measuring exactly what it intended, and
> it simply failed to explain what it meant by "offset".
> 

Both would be useful values, imo. I imagine the peer offset is harder to
both obtain and display though, so it would be no great wonder if the
implementation started off with the "host vs server" offset.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231




More information about the Help mailing list