Re: [Bigsister-general] dns test bug
Brought to you by:
aeby
|
From: Thomas A. <ae...@gr...> - 2015-12-02 16:25:49
|
Hello Kai,
On 02.12.2015 15:00, Kai Schaetzl wrote:
> Let's see if this mailing list still exists. :-)
At least two ... no, three ... members are still here :-)
> I've found a bug today in the dns test. I don't know why but this test is
> not aware to "testers" comamnd,
That's because it's one of the "old style" tests. And there is no
manpage either :-(
> but it works, sort of.
> But the check added to bs is incorrect and queries "just itself"
Indeed, that's very limitted and does result in a problem if you are
monitoring a DNS server which does not resolve uxmon's host.
> wrong code (at the end of the file):
> $cmd->add_check( $args{"alias"}.".dns", "$dnscomm $args{host} $args
> {host}",
> [ 0, "green", "dns OK" ], [ "timeout", "red", "dns
> TIMEOUT" ], [ "*", "red", "dns FAILURE" ] );
>
> correct code:
> $cmd->add_check( $args{"alias"}.".".$args{"item"}, "$dnscomm $args{query}
> $args{host}",
> [ 0, "green", "dns OK" ], [ "timeout", "red", "dns
> TIMEOUT" ], [ "*", "red", "dns FAILURE" ] );
>
> e.g. change the first $args{host} to $args{query}
> and the $args{"alias"}.".dns" to $args{"alias"}.".".$args{"item"}
... and for backwards compatibility I'll add defaults for item/query
("dns" and hostname) and check the changes in.
Other nice things to do in a DNS check: check zone consistency via SOA queries.
But then ...
Thanks a lot for you contribution.
Kind regards,
Tom
--
------------------------------------------------------------------------
Thomas Aeby, Kirchweg 52, 1735 Giffers, Switzerland
Voice : (+41)26 4180040
Internet: ae...@gr... PGP public key available
------------------------------------------------------------------------
|