[Nagiosplug-devel] [ nagiosplug-Bugs-1478287 ] check_dns fails with CNAMEs
SourceForge.net
noreply at sourceforge.net
Mon Jun 11 11:05:08 CEST 2007
Bugs item #1478287, was opened at 2006-04-28 09:43
Message generated for change (Comment added) made by jfidell
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1478287&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: James (jfidell)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_dns fails with CNAMEs
Initial Comment:
check_dns gives an error if the hostname being checked
is a CNAME instead of an A record:
DNS CRITICAL - '/usr/bin/nslookup -sil' msg parsing
exited with no address
This patch may be sub-optimal, but corrects the problem
for me:
--- check_dns.c~ Fri Apr 28 10:35:45 2006
+++ check_dns.c Fri Apr 28 10:35:52 2006
@@ -136,6 +136,13 @@
non_authoritative = TRUE;
}
+ else if ( strstr ( chld_out.line[i], query_address
) && !address ) {
+ if (( temp_buffer = strstr ( chld_out.line[i] +
strlen ( query_address ),
+ _("canonical name = ")))) {
+ address = strdup ( temp_buffer );
+ }
+ }
+
result = error_scan (chld_out.line[i]);
if (result != STATE_OK) {
msg = strchr (chld_out.line[i], ':');
James
----------------------------------------------------------------------
>Comment By: James (jfidell)
Date: 2007-06-11 09:05
Message:
Logged In: YES
user_id=1510516
Originator: YES
OS is FreeBSD 6.0. Not sure about the nslookup version as it seems to
defy my attempts to find out.
IIRC correctly (as this was some time ago), the problem is not
specifically that the format of output of
nslookup is different, but that in same circumstances check_dns
mis-handles the output. I *think*
the problem is that for some configurations (could be where the CNAME is
in a different domain, or where
it is served by a different nameserver, or perhaps just depending on the
nameserver implementation),
nslookup may not return a "Name:" or "Address:" line at all, even though
the nameserver being queried can
and does answer properly that the queried hostname is a canonical name.
----------------------------------------------------------------------
Comment By: Matthias Eble (psychotrahe)
Date: 2007-06-11 08:17
Message:
Logged In: YES
user_id=1694341
Originator: NO
Announced pending state by sending emails to the participants.
----------------------------------------------------------------------
Comment By: Matthias Eble (psychotrahe)
Date: 2007-06-04 16:00
Message:
Logged In: YES
user_id=1694341
Originator: NO
Which OS version/nslookup version are you running? On Ubuntu Linux (6.06)
everything is fine with cnames, too.
nslookup output looks like this:
...
foo.de.tld canonical name = bar.tld.
Name: bar.tld
Address: x.x.x.x
Could you post your output, too?
Thanks Matthias
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1478287&group_id=29880
More information about the Devel
mailing list