[Nagiosplug-help] check_ntp

Andreas Ericsson ae at op5.se
Sat Nov 10 12:01:47 CET 2007


Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> adding -devel to make sure it gets attention...
> 
> On 06/11/07 10:38 AM, Andreas Ericsson wrote:
>> 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.
> 
> check_ntp gets the offset between the local clock the the peer, which is
> good to check if the local server is sync with the remote server, but
> not to check if the remote server is sync with its peers.
> 
> This can easily be changed; the question is do we actually want that?
> (I'm personally all for it...)
> 

I think not. You can accomplish a peer-check by using NRPE or some such
with the current behaviour.

OTOH, adding a --check-peers flag to check_ntp might be worthwhile.

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