[Nagiosplug-devel] check_ntp plugin issues
Ton Voon
ton.voon at altinity.com
Tue Mar 14 02:10:04 CET 2006
On 14 Mar 2006, at 09:33, sean finney wrote:
> hi bill,
>
> check_ntp has been one of the thorns in my side for quite a while. i
> think that trying to parse the output of ntpq is an inherently broken
> concept to begin with. it seems every time we change one of the
> parsing
> pcre's to accomodate for one problem, we break something else.
I agree that check_ntp is difficult to maintain. I was thinking along
the lines of having one part of the code do the cmdline call and
grabbing the output and then have a different part parse the
information. Then we could setup unit tests that parse different
outputs to confirm that we don't break things moving forward.
Thus whenever someone complains about their ntp output being
different, we could add that testcase in and check_ntp would get
sturdier over time.
However, one of the plugin aims is to replace the use of cmdline
parsing with native calls, so this is not the only option.
> i really feel that we should ditch the current version of check_ntp
> entirely, and that we should instead use something like Net::NTP, or
> preferably borrow/adapt/write some c code of our own to perform the
> check.
My preference would be for C routines that would produce a single,
independent executable, but if it has to be in Perl, then so be it.
> the former option would be really, really easy to do from a quick look
> at Net::NTP's documentation, though it would require installations
> to have it installed as a dependency.
>
> not knowing enough about the protocol i can't make any claims on how
> difficult the latter option would be, though as i said it seems to be
> the Right Way imho, and would not put any additional requirements on a
> installation. in fact, it would reduce them as the ntp cmdline
> utilities
> would not need to be installed. if this sounds like a reasonable
> option
> to other folks, i'm willing to sit down with a couple rfc's (1305 and
> 2030, i think) and look at hacking something together.
You can take the lead on this Sean. I just need to know if you think
it will be stable enough for 1.4.3 release or whether it is best to
wait for the subsequent release.
Ton
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
More information about the Devel
mailing list