[Nagiosplug-devel] [Nagiosplug-help] check_ntp

Andreas Ericsson ae at op5.se
Sat Nov 10 16:15:48 CET 2007


Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 10/11/07 06:01 AM, Andreas Ericsson wrote:
>> Thomas Guyot-Sionnest wrote:
>>> 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.
> 
> No, that would become a mess because getting offset between ourself and
> the server and getting the peers offset it a totally different operation
> in NTP.

So? Users think "check_ntp checks stuff concerning the ntp protocol".

> Also it doesn't make much sense to get the former along with
> jitter or stratum.
> 

True. --check-peers would obviously have to complain if stupid options
were given to it.

> I started rewriting check_ntp to use the offset from the peers, and also
> removed the useless loop for getting 4 times the control packets (since
> they all contain the same info).

You mean you're doing something along the lines of what --check-peers
would do?

> I believe the best option is to also
> rewrite check_ntp the other way round to get only offset using normal
> NTP packets and name it something like check_time_ntp (that will be very
> easy).
> 

NO! Seriously. check_ntp is RELEASED already. Giving it completely different
semantics while retaining the name is BROKEN. It will cause real problems
for real people. Doing that just because you want to name your entirely
new plugin check_ntp as well is just stupid.

So unless you add something along the lines of "Oh, the caller thinks I'm
the old check_ntp, since it gives me arguments only that other check_ntp
accepts, I'd better run that program instead to help them", you really
should name your rewritten effort "check_ntp_peers" or some such instead.

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




More information about the Devel mailing list