[Nagiosplug-devel] [ nagiosplug-Bugs-1478287 ] check_dns fails with CNAMEs

SourceForge.net noreply at sourceforge.net
Mon Jun 11 10:17:30 CEST 2007


Bugs item #1478287, was opened at 2006-04-28 11:43
Message generated for change (Comment added) made by psychotrahe
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: Pending
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: Matthias Eble (psychotrahe)
Date: 2007-06-11 10: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 18: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