[Nagiosplug-devel] r1879: check_tcp now returns UNKNOWN with an invalid hostname on command line
Ton Voon
ton.voon at altinity.com
Tue Jan 8 12:48:39 CET 2008
On 8 Jan 2008, at 11:27, Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In check_tcp.c svn logs:
> -
> ------------------------------------------------------------------------
> r1879 | tonvoon | 2007-12-19 05:08:06 -0500 (Wed, 19 Dec 2007) | 2
> lines
>
> check_tcp now returns UNKNOWN with an invalid hostname on command line
>
> This breaks some tests (at least check_ftp and maybe others)... I
> fixed
> check_ftp but I can't guarantee I'll fix all breakages if there's
> more.
>
> Also while I see the point of using UNKNOWNs for unknown hosts, I'm
> thinking whoever is testing a remote host he doesn't control with
> check_tcp will receive UNKNOWN instead of CRITICAL if the hostname
> changes which might not be the expected behavior.
>
> So it should be well documented that whoever is running checks with
> hostnames should check with check_dns as well, especially for hosts
> they
> don't have control over.
Fair point. I specifically made this change because in a Nagios
configuration $HOSTADDRESS$ wasn't set, so the check_tcp was
effectively running:
check_tcp -H -w 5
and mistaking -w for the hostname. My thinking was that this was a
command line options error, hence UNKNOWN. However, I've obviously
implemented it as a hostname resolution check.
Looking at http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN78
, it's a higher level error so shouldn't be UNKNOWN and should be
CRITICAL.
So, sorry, I screwed up here twice: once for changing to UNKNOWN, and
twice for not checking the test results to see the impact.
I'll revert back now.
Ton
http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon
More information about the Devel
mailing list