[Nagiosplug-devel] Re: [Nagios-devel] Re: Bug in check_dns plugin

Jeremy T. Bouse jeremy+nagios at UnderGrid.net
Sat Jan 11 11:05:04 CET 2003


	Although I think this should be in the plugin-devel list I'll
glue the two threads together...

	Another issue with the check_dns and check_dig plugins is their
dependence on the BIND nslookup and dig commands which in themselves
have some issues... Specifically if you try to have them do reverse
lookups... 

	Nslookup if given an IPv4 address will properly convert it to
the in-addr.arpa zone and do the lookup fine, dig will not... Now as I'm
working on IPv6 support if you give nslookup an IPv6 address it will
improperly try to convert it to a bit-string notated ip6.arpa address
which should be a nibble-mode notated ip6.arpa address per the current
RFCs and dig again can't handle it at all just like IPv4... 

	I see this as a problem that any plugin will encounter when we
have to rely on shell commands to do the actual work for us and a
caution to look at the shell commands responses before thinking there is
an issue in a given plugin...

	Jeremy

On Sat, Jan 11, 2003 at 06:49:39AM -0800, Mike Harding wrote:
> 
> Whoops, the man page is confusing, I retract my error statement.  I am
> using FreeBSD and the system nslookup won't query an authoritative
> name server properly, but the bind 9 one will.  I am using bind 9 but
> I still have the bind 8 nslookup in my path...
> 
>    Date: 9 Jan 2003 19:20:41 -0800
>    From: Mike Harding <mvh at ix.netcom.com>
> 
> 
>    the 'nslookup' command apparently needs a '-' before the server name
>    or address, this is missing in the code.  I found this when debugging
>    a Authoritative server, where I needed to specify the server.  I use
>    freebsd but I checked a linux man page and apparently linux needs the
>    '-' also...
> 
>    - Mike Harding
> 
>    --- check_dns.c~	Thu Nov 14 17:04:51 2002
>    +++ check_dns.c	Thu Jan  9 19:15:55 2003
>    @@ -88,7 +88,7 @@
> 	   }
> 
> 	   /* get the command to run */
>    -	asprintf (&command_line, "%s %s %s", NSLOOKUP_COMMAND,	query_address, dns_server);
>    +	asprintf (&command_line, "%s %s -%s", NSLOOKUP_COMMAND,	query_address, dns_server);
> 
> 	   alarm (timeout_interval);
> 	   time (&start_time);
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel




More information about the Devel mailing list